-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check map types for
deepEquals
method
Fixes #1261
- Loading branch information
Showing
4 changed files
with
55 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
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
14 changes: 14 additions & 0 deletions
14
src/types/stmts-failed/map-deepEquals-type-mismatch-2.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,14 @@ | ||
primitive Bool; | ||
primitive Int; | ||
primitive Address; | ||
|
||
trait BaseTrait {} | ||
|
||
contract Test { | ||
get fun foo(): Bool { | ||
let m1: map<Address, Int> = emptyMap(); | ||
m1.set(address(""), 0); | ||
let m2: map<Int, Address> = emptyMap(); | ||
return m1.deepEquals(m2); | ||
} | ||
} |
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 @@ | ||
primitive Bool; | ||
primitive Int; | ||
primitive Address; | ||
|
||
trait BaseTrait {} | ||
|
||
contract Test { | ||
get fun foo(): Bool { | ||
let m1: map<Int, Int> = emptyMap(); | ||
m1.set(42, 0); | ||
let m2: map<Address, Int> = emptyMap(); | ||
return m1.deepEquals(m2); | ||
} | ||
} |