Warn about functions named "constructor".

This commit is contained in:
chriseth
2018-04-18 21:23:09 +02:00
parent cd17c37fe6
commit 4895864302
3 changed files with 13 additions and 2 deletions
@@ -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.