From 489586430202d17fb60d973503ab27670474143d Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 18 Apr 2018 14:28:53 +0200 Subject: Warn about functions named "constructor". --- .../syntaxTests/constructor/function_named_constructor.sol | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/libsolidity/syntaxTests/constructor/function_named_constructor.sol (limited to 'test') 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. -- cgit v1.2.3