diff options
author | chriseth <chris@ethereum.org> | 2018-11-30 00:59:34 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-11-30 23:30:19 +0800 |
commit | 621ce3df20ad019cf3e86cc2bbae22a59610847f (patch) | |
tree | cd8767472bc3cb38d2bd8bdf27abfe228987045e /test/libsolidity/syntaxTests/constructor | |
parent | 2c2c976697d22400d37f3b26064b6b1f6fc91dba (diff) | |
download | dexon-solidity-621ce3df20ad019cf3e86cc2bbae22a59610847f.tar dexon-solidity-621ce3df20ad019cf3e86cc2bbae22a59610847f.tar.gz dexon-solidity-621ce3df20ad019cf3e86cc2bbae22a59610847f.tar.bz2 dexon-solidity-621ce3df20ad019cf3e86cc2bbae22a59610847f.tar.lz dexon-solidity-621ce3df20ad019cf3e86cc2bbae22a59610847f.tar.xz dexon-solidity-621ce3df20ad019cf3e86cc2bbae22a59610847f.tar.zst dexon-solidity-621ce3df20ad019cf3e86cc2bbae22a59610847f.zip |
Test.
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. |