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

10 lines
268 B
Solidity
Raw Normal View History

2018-04-17 09:39:40 +00:00
contract test1 {
2020-06-23 12:14:24 +00:00
constructor() view {}
}
2018-07-04 09:47:35 +00:00
contract test2 {
2020-06-23 12:14:24 +00:00
constructor() pure {}
2018-04-17 09:39:40 +00:00
}
// ----
2020-06-23 12:14:24 +00:00
// TypeError 1558: (19-40): Constructor must be payable or non-payable, but is "view".
// TypeError 1558: (62-83): Constructor must be payable or non-payable, but is "pure".