Repository navigation
Conversation
… add its fixture Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Widens C-345 (ALS-C5) to cover a type-variable parameter instantiated at Result, and adds a fixture for it.
Why. almide/almide#3646 found a case C-345 doesn't cover. Inside an effect fn,
id(int.parse("7"))(wherefn id[T](x: T) -> T), or alist.foldseeded with a Result-returning call, lowered with a?on the argument:almide checkaccepted the program.The per-parameter exemption from #1970 only read parameters declared Result/Option.
The amended statement says that no call argument takes the auto-
?. The checker constrains every argument against its parameter (E005, with!as the only propagation), so an argument that is still Result-typed is one its parameter accepts. The title is widened to match.The fixture,
spec/wasm_cross/result_generic_param_arg.almd, covers:idof a pure Result call, an Err Result and an effect call;list.foldseeded with a Result call and with an effect call;map.get_orandlist.get_orwith Result defaults.Judge, run locally.
ref/target/release/als-ref run … --jsonprints exactly what almide prints on native and wasm with the almide fix (branchfix-3646-generic-arg-auto-try), byte for byte, exit 0.