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

14 lines
389 B
Solidity
Raw Normal View History

2018-04-17 09:39:40 +00:00
contract test1 {
constructor() constant {}
}
contract test2 {
constructor() view {}
}
contract test3 {
constructor() pure {}
}
// ----
// TypeError: (19-44): Constructor must be payable or non-payable, but is "view".
// TypeError: (66-87): Constructor must be payable or non-payable, but is "view".
// TypeError: (109-130): Constructor must be payable or non-payable, but is "pure".