-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1914 `$$` says it refers to the pre-conversion value, but that's not true within a hook. This fixes that so that `$$` always refers to the pre-conversion value.
- Loading branch information
1 parent
d9c025d
commit 9d9f2e9
Showing
5 changed files
with
20 additions
and
6 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
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,3 @@ | ||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. | ||
True | ||
True |
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,14 @@ | ||
# @TEST-EXEC: echo '00' | spicy-driver -d %INPUT >output | ||
# @TEST-EXEC: btest-diff output | ||
|
||
module DDConsistency; | ||
|
||
public type Data = unit { | ||
x: uint8 &convert=($$ + 5) &requires=($$ < 50) { | ||
print $$ < 50; # Should print True since it got through the requires | ||
} | ||
|
||
y: uint8 &convert=($$ == 48) &requires=($$ < 50) { | ||
print $$ == 48; # Should succeed compiling since $$ is uint8 still | ||
} | ||
}; |