diff options
author | chriseth <chris@ethereum.org> | 2018-06-20 03:32:03 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-01 18:04:35 +0800 |
commit | c8232d9759458d5f6e1442533457d8529686eea7 (patch) | |
tree | cb1d8f4876b4984213134ad56ff5fb15db867d57 /test/libsolidity/syntaxTests/constructor | |
parent | 21888e246b771325ea55da39d7f335638da1a98e (diff) | |
download | dexon-solidity-c8232d9759458d5f6e1442533457d8529686eea7.tar.gz dexon-solidity-c8232d9759458d5f6e1442533457d8529686eea7.tar.zst dexon-solidity-c8232d9759458d5f6e1442533457d8529686eea7.zip |
Disallow conversion between unrelated contract types.
Diffstat (limited to 'test/libsolidity/syntaxTests/constructor')
-rw-r--r-- | test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol b/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol index 2a199b3a..ea2ec8f6 100644 --- a/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol +++ b/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol @@ -3,11 +3,10 @@ contract B { A a; constructor() public { - a = new A(this); + a = new A(address(this)); } } contract A { - constructor(address a) internal {} + constructor(address) public {} } // ---- -// TypeError: (141-146): Contract with internal constructor cannot be created directly. |