mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Fix internal error on constructor of a recursive struct
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract Test {
|
||||
struct RecursiveStruct {
|
||||
RecursiveStruct[] vals;
|
||||
}
|
||||
function func() public pure {
|
||||
RecursiveStruct[1] memory val = [ RecursiveStruct(new RecursiveStruct[](42)) ];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 2072: (136-165): Unused local variable.
|
||||
// Warning 8364: (170-212): Assertion checker does not yet implement type struct Test.RecursiveStruct memory
|
||||
// Warning 8364: (170-212): Assertion checker does not yet implement type struct Test.RecursiveStruct memory
|
||||
@@ -0,0 +1,21 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract Test {
|
||||
struct RecursiveStruct {
|
||||
uint x;
|
||||
RecursiveStruct[] vals;
|
||||
}
|
||||
function func() public pure {
|
||||
RecursiveStruct memory val = RecursiveStruct(1, new RecursiveStruct[](42));
|
||||
assert(val.x == 1);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 8115: (146-172): Assertion checker does not yet support the type of this variable.
|
||||
// Warning 8364: (175-220): Assertion checker does not yet implement type struct Test.RecursiveStruct memory
|
||||
// Warning 7650: (231-236): Assertion checker does not yet support this expression.
|
||||
// Warning 8364: (231-234): Assertion checker does not yet implement type struct Test.RecursiveStruct memory
|
||||
// Warning 6328: (224-242): CHC: Assertion violation happens here.\nCounterexample:\n\n\n\n\nTransaction trace:\nconstructor()\nfunc()
|
||||
// Warning 8115: (146-172): Assertion checker does not yet support the type of this variable.
|
||||
// Warning 8364: (175-220): Assertion checker does not yet implement type struct Test.RecursiveStruct memory
|
||||
// Warning 7650: (231-236): Assertion checker does not yet support this expression.
|
||||
// Warning 8364: (231-234): Assertion checker does not yet implement type struct Test.RecursiveStruct memory
|
||||
Reference in New Issue
Block a user