-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix type checker not substituting type var when unifying match arms (#…
…735)
- Loading branch information
1 parent
71fb680
commit f467eff
Showing
9 changed files
with
48 additions
and
5 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
File renamed without changes.
File renamed without changes.
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,14 @@ | ||
type Nat_: | ||
Zero | ||
Succ {x: Unit, pred: Nat_} | ||
|
||
type Unit: | ||
Unit | ||
|
||
Test1: Nat_ -> (Nat_, Nat_) | ||
Test1 = λx match x { | ||
Nat_/Zero: (Nat_/Zero, Nat_/Zero) | ||
Nat_/Succ: (x.x, x.pred) | ||
} | ||
|
||
main = * |
2 changes: 1 addition & 1 deletion
2
..._file__fail_type_bad_rec_fn_adt.bend.snap → ..._file__fail_type_bad_rec_fn_adt.bend.snap
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
4 changes: 2 additions & 2 deletions
4
...sugar_file__non_exaustive_limit.bend.snap → ...check_file__non_exaustive_limit.bend.snap
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,8 +1,8 @@ | ||
--- | ||
source: tests/golden_tests.rs | ||
input_file: tests/golden_tests/desugar_file/non_exaustive_limit.bend | ||
input_file: tests/golden_tests/check_file/non_exaustive_limit.bend | ||
--- | ||
[4m[1m[31mErrors:[0m | ||
[1mIn [4mtests/golden_tests/desugar_file/non_exaustive_limit.bend[0m[1m :[0m | ||
[1mIn [4mtests/golden_tests/check_file/non_exaustive_limit.bend[0m[1m :[0m | ||
[1mIn definition '[4mBar[0m[1m':[0m | ||
Non-exhaustive pattern matching rule. Constructor 'Foo/B' of type 'Foo' not covered |
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,9 @@ | ||
--- | ||
source: tests/golden_tests.rs | ||
input_file: tests/golden_tests/check_file/type_err_match_arm.bend | ||
--- | ||
[4m[1m[31mErrors:[0m | ||
[1mIn [4mtests/golden_tests/check_file/type_err_match_arm.bend[0m[1m :[0m | ||
[1mIn definition '[4mTest1[0m[1m':[0m | ||
In (Nat_/Zero, Nat_/Zero): | ||
Can't unify '(Nat_, Nat_)' and '(Unit, Nat_)'. |