[SMTChecker] Support contract type

This commit is contained in:
Leonardo Alt
2019-04-17 16:30:11 +02:00
parent 4509e8efbb
commit ecd89393ee
12 changed files with 66 additions and 4 deletions
@@ -9,4 +9,5 @@ contract C {
}
}
// ----
// Warning: (99-103): Assertion checker does not yet support the type of this variable.
// Warning: (141-144): Assertion checker does not support recursive function calls.
@@ -17,5 +17,4 @@ contract C
}
}
// ----
// Warning: (119-122): Assertion checker does not yet support the type of this variable.
// Warning: (240-254): Assertion violation happens here
@@ -17,5 +17,4 @@ contract C
}
}
// ----
// Warning: (139-142): Assertion checker does not yet support the type of this variable.
// Warning: (280-304): Assertion violation happens here
@@ -18,5 +18,4 @@ contract C
}
}
// ----
// Warning: (146-149): Assertion checker does not yet support the type of this variable.
// Warning: (338-362): Assertion violation happens here
@@ -0,0 +1,10 @@
pragma experimental SMTChecker;
contract C
{
function f(C c, C d) public pure {
assert(c == d);
}
}
// ----
// Warning: (84-98): Assertion violation happens here
@@ -0,0 +1,15 @@
pragma experimental SMTChecker;
contract D
{
uint x;
}
contract C
{
function f(D c, D d) public pure {
assert(c == d);
}
}
// ----
// Warning: (109-123): Assertion violation happens here
@@ -0,0 +1,10 @@
pragma experimental SMTChecker;
contract C
{
function f(C c, C d, C e) public pure {
require(c == d);
require(d == e);
assert(c == e);
}
}
@@ -0,0 +1,10 @@
pragma experimental SMTChecker;
contract C
{
function f(C c, address a) public pure {
assert(address(c) == a);
}
}
// ----
// Warning: (90-113): Assertion violation happens here
@@ -0,0 +1,11 @@
pragma experimental SMTChecker;
contract C
{
function f(C c, C d) public pure {
assert(address(c) == address(c));
address a = address(c);
require(c == d);
assert(a == address(d));
}
}