aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-04-18 20:28:53 +0800
committerchriseth <chris@ethereum.org>2018-04-19 03:23:09 +0800
commit489586430202d17fb60d973503ab27670474143d (patch)
treead708894de37ac9df7c6d7f8547ded8c990dc662 /test
parentcd17c37fe6df143558a8aaadcec2495ff50f90df (diff)
downloaddexon-solidity-489586430202d17fb60d973503ab27670474143d.tar
dexon-solidity-489586430202d17fb60d973503ab27670474143d.tar.gz
dexon-solidity-489586430202d17fb60d973503ab27670474143d.tar.bz2
dexon-solidity-489586430202d17fb60d973503ab27670474143d.tar.lz
dexon-solidity-489586430202d17fb60d973503ab27670474143d.tar.xz
dexon-solidity-489586430202d17fb60d973503ab27670474143d.tar.zst
dexon-solidity-489586430202d17fb60d973503ab27670474143d.zip
Warn about functions named "constructor".
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/syntaxTests/constructor/function_named_constructor.sol5
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.