-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
4 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
23 changes: 22 additions & 1 deletion
23
k-distribution/tests/regression-new/checkWarns/singletonOverload.k
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,11 +1,32 @@ | ||
module SINGLETONOVERLOAD-SYNTAX | ||
endmodule | ||
|
||
module SINGLETONOVERLOAD | ||
module WARNS | ||
imports ID | ||
|
||
syntax LVal ::= L() [unused] | ||
| LVal "." Id [unused, overload(_.)] | ||
syntax Exp ::= LVal | ||
| Exp "." Id [unused, overload(_._)] | ||
endmodule | ||
|
||
module NOWARNS | ||
imports BOOL | ||
|
||
syntax Foo ::= "foo" | "bar" | ||
syntax Foos ::= List{Foo, ","} | ||
|
||
syntax Bool ::= test(Foo) [function, overload(test)] | ||
| test(Foos) [function, overload(test)] | ||
|
||
rule test(foo) => true | ||
rule test(bar) => false | ||
|
||
rule test(F, Rest) => test(F) andBool test(Rest) | ||
rule test(.Foos) => true | ||
endmodule | ||
|
||
module SINGLETONOVERLOAD | ||
imports WARNS | ||
imports NOWARNS | ||
endmodule |
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