diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-19 05:22:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-19 05:22:58 +0800 |
commit | 39b7b44a8d63c9e50911ba724221b4a6399e7f5e (patch) | |
tree | 9b78fe43da7ad3b0a68efc43f3df49903c776ea1 /test/libsolidity | |
parent | 377254d5a89f3e24cd9c317fdef715101078edff (diff) | |
parent | 489586430202d17fb60d973503ab27670474143d (diff) | |
download | dexon-solidity-39b7b44a8d63c9e50911ba724221b4a6399e7f5e.tar.gz dexon-solidity-39b7b44a8d63c9e50911ba724221b4a6399e7f5e.tar.zst dexon-solidity-39b7b44a8d63c9e50911ba724221b4a6399e7f5e.zip |
Merge pull request #3923 from ethereum/warnConstructor
Warn about functions named "constructor".
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/syntaxTests/constructor/function_named_constructor.sol | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/constructor/function_named_constructor.sol b/test/libsolidity/syntaxTests/constructor/function_named_constructor.sol new file mode 100644 index 00000000..29784033 --- /dev/null +++ b/test/libsolidity/syntaxTests/constructor/function_named_constructor.sol @@ -0,0 +1,5 @@ +contract C { + function constructor() public; +} +// ---- +// Warning: (17-47): This function is named "constructor" but is not the constructor of the contract. If you intend this to be a constructor, use "constructor(...) { ... }" without the "function" keyword to define it. |