solidity/test/libsolidity/syntaxTests/constructor/constructor_old.sol

4 lines
221 B
Solidity
Raw Normal View History

2018-04-17 09:39:40 +00:00
contract A { function A() public {} }
// ----
// SyntaxError: (13-35): Functions are not allowed to have the same name as the contract. If you intend this to be a constructor, use "constructor(...) { ... }" to define it.