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

10 lines
258 B
Solidity
Raw Normal View History

2018-04-17 09:39:40 +00:00
contract test1 {
constructor() view {}
}
2018-05-08 11:08:52 +00:00
contract test2 {
2018-04-17 09:39:40 +00:00
constructor() pure {}
}
// ----
2018-05-08 11:08:52 +00:00
// TypeError: (19-40): Constructor must be payable or non-payable, but is "view".
// TypeError: (62-83): Constructor must be payable or non-payable, but is "pure".