mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
14 lines
389 B
Solidity
14 lines
389 B
Solidity
|
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".
|