-
Notifications
You must be signed in to change notification settings - Fork 439
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 #262 from HigherOrderCO/bug/sc-510/unused-definiti…
…on-warning-triggered-on-matched [sc-510] Unused definition warning triggered on matched constructors when scott encoding is used
- Loading branch information
Showing
4 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// The test below should not trigger this warning: | ||
// | ||
// In definition 'f': | ||
// Definition is unused. | ||
// In definition 't': | ||
// Definition is unused. | ||
// | ||
// This was happening because the prune algorithm was just collecting constructors | ||
// by searching for tags. | ||
|
||
data bool = t | f | ||
|
||
main = @b match b { t: 0; f: 1} |
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/scott_triggers_unused/test.hvm | ||
--- | ||
@f = (* (a a)) | ||
|
||
@main = ((#0 (#1 a)) a) | ||
|
||
@t = (a (* a)) |