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

14 lines
411 B
Solidity
Raw Normal View History

2018-04-17 09:39:40 +00:00
contract test1 {
constructor() public constant {}
2018-04-17 09:39:40 +00:00
}
2018-05-08 11:08:52 +00:00
contract test2 {
constructor() public view {}
}
contract test3 {
constructor() public pure {}
2018-04-17 09:39:40 +00:00
}
// ----
// TypeError: (19-51): Constructor must be payable or non-payable, but is "view".
// TypeError: (73-101): Constructor must be payable or non-payable, but is "view".
// TypeError: (123-151): Constructor must be payable or non-payable, but is "pure".