-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #998 from HadrienRenaud/asl-fix-setter-bug
[asl] fix setter bug Some expressions were not annotated during setter expansion, this is now fixed.
- Loading branch information
Showing
5 changed files
with
48 additions
and
18 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 was deleted.
Oops, something went wrong.
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,26 @@ | ||
type MyBV of bits(8) { [5] bitfield }; | ||
|
||
getter F => MyBV | ||
begin | ||
return Zeros(8) as MyBV; | ||
end | ||
|
||
setter F = v: MyBV | ||
begin | ||
assert v[0] == '0'; | ||
end | ||
|
||
func foo () => (bit, integer) | ||
begin | ||
return ('0', 1); | ||
end | ||
|
||
func main () => integer | ||
begin | ||
var x: integer = 0; | ||
(F.bitfield, x) = foo(); | ||
assert x == 1; | ||
|
||
return 0; | ||
end | ||
|