-
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.
Reorder flattening of refinement types in pipeline
The flattening must be done after instantiating polymorphic nodes.
- Loading branch information
1 parent
cbace84
commit ea6472d
Showing
2 changed files
with
23 additions
and
11 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
12 changes: 12 additions & 0 deletions
12
tests/regression/success/flatten_ref_type_in_poly_node.lus
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,12 @@ | ||
|
||
type Nat = subtype { n: int | 0 <= n }; | ||
|
||
node N2<<T>>() returns (r: T); | ||
let | ||
r = any T; | ||
tel | ||
|
||
node N1() returns (z: Nat); | ||
let | ||
z = N2<<Nat>>(); | ||
tel |