diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/constructor')
-rw-r--r-- | test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol b/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol new file mode 100644 index 00000000..2e6aeaa5 --- /dev/null +++ b/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol @@ -0,0 +1,15 @@ +// 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. |