mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Support contract type
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user