Open hajduakos opened 4 years ago
If we add the constructor explicitly, it works:
pragma solidity >=0.5.0;
contract Base {
constructor() public {
assembly { /* ... */ }
}
}
contract Derived is Base {
constructor() public {}
}
gives
Base::[constructor]: SKIPPED
Derived::[constructor]: SKIPPED
Use --show-warnings to see 2 warnings.
Some functions were skipped. Use --show-warnings to see details.
No errors found.
Output should be similar if the constructor is implicit.
Fixed in 4beece6
If there is an unsupported feature in a function, we give a quite user friendly message and skip that function. However, implicit constructors are generated separately and for them this is not done, but rather some confusing errors are printed.
For the following contracts
we get the output
The first error and warning corresponds to skipping the constructor of
Base
. However there is an extra error afterwards that corresponds to inlining the constructor ofBase
when creating the implicit constructor ofDerived
, but this cannot be seen in the output. This also makes the whole translation and verification fail, instead of printing the skipped functions in a nice way. The workaround should be simple, we just have to include the error reporter swapping code from functions into implicit constructors as well.