-
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.
Merge branch 'main' into stack-deepness
- Loading branch information
Showing
11 changed files
with
392 additions
and
3 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
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
21 changes: 21 additions & 0 deletions
21
src/types/stmts-failed/expr-method-call-null-ambiguous.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,21 @@ | ||
primitive Bool; | ||
primitive Int; | ||
primitive String; | ||
|
||
trait BaseTrait { } | ||
|
||
extends fun foo(self: Int?): Bool { | ||
if (self == null) { return false } | ||
else { return self!! == 42 } | ||
} | ||
|
||
extends fun foo(self: String?): Bool { | ||
if (self == null) { return false } | ||
else { return self!! == "hello" } | ||
} | ||
|
||
contract Test { | ||
get fun test(): Bool { | ||
return null.foo(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/types/stmts-failed/expr-method-call-null-not-existing.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,16 @@ | ||
primitive Bool; | ||
primitive Int; | ||
primitive String; | ||
|
||
trait BaseTrait { } | ||
|
||
extends fun foo(self: Int?): Bool { | ||
if (self == null) { return false } | ||
else { return self!! == 42 } | ||
} | ||
|
||
contract Test { | ||
get fun test(): Bool { | ||
return null.bar(); | ||
} | ||
} |
Oops, something went wrong.