Closed michael-emmi closed 5 years ago
This is work in progress, as of f9efd13 we now inline the body of base constructors so this example should work. Being able to pass arguments for the base constructors is coming soon.
Base constructor arguments are also implemented in 8a9fe1d
It works for simple cases like the following (arguments provided either in inheritance list or as modifiers): https://github.com/SRI-CSL/solidity/blob/8a9fe1d7995a97a82ab6c4cbc4e85f5308214cab/test/solc-verify/InheritanceBaseConstructorArgs.sol, but needs some more tests for complex cases
It does not yet work for cases when the base constructor has modifiers (that will require some extra inlining job), but instead of silently ignoring it, there is an appropriate error message.
However, I think this issue can be closed as the base constructor call is not missing anymore. There might be errors, but we can open separate issues for those.
Base constructors with modifiers are also working as of de5efb6.
I added a new test case failing with constructors
solc-verify.py test/solc-verify/BaseConstructorOrder.sol --output .
Error while running verifier, details:
[TRACE] Using prover: /usr/local/bin/z3
Parsing ./BaseConstructorOrder.sol.bpl
./BaseConstructorOrder.sol.bpl(93,12): Error: undeclared identifier: _x#18
1 name resolution errors detected in ./BaseConstructorOrder.sol.bpl
solc-verify.py test/solc-verify/BaseConstructorOrder.sol --no-modifies-analysis --output .
Verifying A::set: OK
Verifying A::[constructor]: OK
Verifying B1::[constructor]: OK
Verifying B2::[constructor]: OK
Verifying BaseConstructorOrder::[constructor]: ERROR
- Source test/solc-verify/BaseConstructorOrder.sol, line 23, col 5: Assertion might not hold.
Verifying BaseConstructorOrder::: OK
Errors were found by the verifier.