-
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.
[asl] Prevent use of empty slices on integers and bitvectors.
- Loading branch information
1 parent
3b4e1b3
commit f400b77
Showing
4 changed files
with
25 additions
and
7 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
8 changes: 4 additions & 4 deletions
8
asllib/tests/regressions.t/empty-setter-called-with-slices.asl
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
getter f1 => integer | ||
getter f1 => bits(4) | ||
begin | ||
return 4; | ||
return '0000'; | ||
end | ||
|
||
setter f1 = v: integer | ||
setter f1 = v: bits(4) | ||
begin | ||
pass; | ||
end | ||
|
||
func main () => integer | ||
begin | ||
f1[] = 4; | ||
f1[] = ''; | ||
|
||
return 0; | ||
end |
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