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

10 lines
272 B
Solidity
Raw Normal View History

2018-04-17 09:39:40 +00:00
contract test1 {
constructor() public view {}
}
2018-07-04 09:47:35 +00:00
contract test2 {
constructor() public pure {}
2018-04-17 09:39:40 +00:00
}
// ----
2018-07-04 09:47:35 +00:00
// TypeError: (19-47): Constructor must be payable or non-payable, but is "view".
// TypeError: (69-97): Constructor must be payable or non-payable, but is "pure".