-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure type inference checks rhsSort <: lhsSort for macro rules (#3666)
Closes #3661
- Loading branch information
1 parent
a26d8e1
commit bc1ffc5
Showing
3 changed files
with
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright (c) K Team. All Rights Reserved. | ||
module WIDENINGMACRO | ||
imports INT | ||
imports BOOL | ||
|
||
syntax Bool ::= #bar ( Int ) [alias] | ||
|
||
rule #bar ( X ) => X | ||
endmodule |
6 changes: 6 additions & 0 deletions
6
k-distribution/tests/regression-new/checks/wideningMacro.k.out
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,6 @@ | ||
[Error] Inner Parser: Unexpected sort Int for term parsed as production syntax {Sort} Sort ::= Sort "=>" Sort [klabel(#KRewrite), symbol]. Expected: Bool | ||
Source(wideningMacro.k) | ||
Location(8,10,8,25) | ||
8 | rule #bar ( X ) => X | ||
. ^~~~~~~~~~~~~~~ | ||
[Error] Compiler: Had 1 parsing errors. |
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