-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Properly force enum variants (#1835)
* Properly force enum variants The implementation of deep_seq and force primops haven't been properly updated to handle enum variants, letting them mostly unevaluated. This could in particular let contracts be unexpectedly unevaluated, and also show unevaluated chunk in the REPL when inputting enum variants there, which isn't ideal. This commit properly forces enum variants. * Apply suggestions from code review Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io> --------- Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io>
- Loading branch information
Showing
4 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# test.type = 'error' | ||
# | ||
# [test.metadata] | ||
# error = 'EvalError::BlameError' | ||
|
||
# Check that deep_seq correctly evaluates the content of an enum variant | ||
%deep_seq% ('Foo 5 | [| 'Foo String |]) null |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# test.type = 'error' | ||
# | ||
# [test.metadata] | ||
# error = 'EvalError::BlameError' | ||
|
||
# Check that force correctly evaluates the content of an enum variant | ||
%force% ('Foo 5 | [| 'Foo String |]) |