solidity/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol

16 lines
349 B
Solidity
Raw Normal View History

2018-11-29 16:59:34 +00:00
// This used to cause an internal error because of the visitation order.
contract Test {
function createChild() public {
Child asset = new Child();
}
}
contract Parent {
constructor(address _address) public {}
}
contract Child is Parent {
}
// ----
// TypeError: (146-155): Trying to create an instance of an abstract contract.