-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nits in the typechecker and more tests
- Loading branch information
Showing
7 changed files
with
209 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
constructor of A | ||
interface constructor(uint w1) | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
creates | ||
uint w := w1 | ||
|
||
constructor of B | ||
interface constructor(uint z1) | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
creates | ||
uint z := z1 | ||
|
||
constructor of C | ||
interface constructor(address a1, address a2) | ||
|
||
pointers | ||
a1 |-> A | ||
a2 |-> B | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
creates | ||
A a := a1 | ||
B b := a2 | ||
|
||
constructor of D | ||
interface constructor(address a1, address a2) | ||
|
||
pointers | ||
a1 |-> A | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
creates | ||
C c1 := create C(a1, a2) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
constructor of C | ||
interface constructor(uint z1) | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
creates | ||
uint z := z1 | ||
|
||
constructor of A | ||
interface constructor(uint x1) | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
creates | ||
uint x := x1 | ||
C c := create C(42) | ||
|
||
|
||
behaviour c of A | ||
interface c() | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
returns (pre(c)) | ||
|
||
constructor of B | ||
interface constructor(address x) | ||
|
||
pointers | ||
x |-> A | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
creates | ||
A a := x | ||
C c := x.c |
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,32 @@ | ||
pragma solidity >=0.8.0; | ||
|
||
contract C { | ||
uint z; | ||
|
||
constructor(uint z1) { | ||
z = z1; | ||
} | ||
|
||
} | ||
|
||
|
||
contract A { | ||
uint x; | ||
C public c; | ||
|
||
constructor(uint x1) { | ||
x = x1; | ||
c = new C(42); | ||
} | ||
} | ||
|
||
|
||
contract B { | ||
A a; | ||
C c; | ||
|
||
constructor(address x) { | ||
a = A(x); | ||
c = a.c(); | ||
} | ||
} |