-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check new variable bindings do not shadow global constants (#680)
- Loading branch information
1 parent
47c0c41
commit 8eb102c
Showing
10 changed files
with
178 additions
and
32 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
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
11 changes: 11 additions & 0 deletions
11
src/types/stmts-failed/var-scope-const-shadowing-catch.tact
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,11 @@ | ||
primitive Int; | ||
|
||
const foo: Int = 42; | ||
|
||
fun bar(): Int { | ||
try { } | ||
catch (foo) { // <-- `foo` shadows global const `foo` | ||
} | ||
return foo; | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
src/types/stmts-failed/var-scope-const-shadowing-external-param.tact
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,11 @@ | ||
primitive Int; | ||
trait BaseTrait {} | ||
|
||
message Message {} | ||
|
||
const foo: Int = 42; | ||
|
||
contract Test { | ||
external (foo: Message) { // <-- `foo` shadows global const `foo` | ||
} | ||
} |
Oops, something went wrong.