-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TC: Fix missing location in mapping patterns
Reported in PR 834
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[93mType error[0m: | ||
[96mfail/mp_tuple_loc.sail[0m:9.9-24: | ||
9[96m |[0m () <-> foo((), (), ()), | ||
[91m |[0m [91m^-------------^[0m | ||
[91m |[0m Tuple mapping-pattern and tuple type have different length |
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,16 @@ | ||
|
||
enum E = A | ||
|
||
mapping foo : (unit, unit) <-> E = { | ||
((), ()) <-> A, | ||
} | ||
|
||
mapping bar : unit <-> E = { | ||
() <-> foo((), (), ()), | ||
} | ||
|
||
val main : unit -> unit | ||
|
||
function main() = { | ||
let _ : E = bar(); | ||
} |