-
Notifications
You must be signed in to change notification settings - Fork 29
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 #1097 from daniel-larraz/abstract-enum-variant
Abstract if node argument is enum variant
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 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,26 @@ | ||
|
||
type E = enum {A, B}; | ||
|
||
const C1: int; | ||
const C2: int = 0; | ||
|
||
node N2(x: int) returns (y: int); | ||
let | ||
y = x; | ||
tel | ||
|
||
node N3(x: E) returns (y: E); | ||
let | ||
y = x; | ||
tel | ||
|
||
node N1(const x: int) returns (y1,y2,y3: int; z: E); | ||
let | ||
y1 = N2(C1); | ||
y2 = N2(x); | ||
y3 = N2(C2); | ||
z = N3(A); | ||
check y1 = y2 => x = C1; | ||
check y3 >= 0; | ||
check z = A; | ||
tel |