mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fixes broken syntax tests.
This commit is contained in:
parent
2e0d019ef0
commit
0dd3e6052c
@ -1,13 +1,9 @@
|
|||||||
contract test1 {
|
contract test1 {
|
||||||
constructor() public constant {}
|
|
||||||
}
|
|
||||||
contract test2 {
|
|
||||||
constructor() public view {}
|
constructor() public view {}
|
||||||
}
|
}
|
||||||
contract test3 {
|
contract test2 {
|
||||||
constructor() public pure {}
|
constructor() public pure {}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (19-51): Constructor must be payable or non-payable, but is "view".
|
// TypeError: (19-47): Constructor must be payable or non-payable, but is "view".
|
||||||
// TypeError: (73-101): Constructor must be payable or non-payable, but is "view".
|
// TypeError: (69-97): Constructor must be payable or non-payable, but is "pure".
|
||||||
// TypeError: (123-151): Constructor must be payable or non-payable, but is "pure".
|
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
contract test1 {
|
contract test1 {
|
||||||
function test1() public constant {}
|
function test1() public view {}
|
||||||
}
|
}
|
||||||
contract test2 {
|
contract test2 {
|
||||||
function test2() public view {}
|
function test2() public pure {}
|
||||||
}
|
|
||||||
contract test3 {
|
|
||||||
function test3() public pure {}
|
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// Warning: (21-56): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
|
// Warning: (21-52): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
|
||||||
// Warning: (80-111): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
|
// Warning: (76-107): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
|
||||||
// Warning: (135-166): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
|
// TypeError: (21-52): Constructor must be payable or non-payable, but is "view".
|
||||||
// TypeError: (21-56): Constructor must be payable or non-payable, but is "view".
|
// TypeError: (76-107): Constructor must be payable or non-payable, but is "pure".
|
||||||
// TypeError: (80-111): Constructor must be payable or non-payable, but is "view".
|
|
||||||
// TypeError: (135-166): Constructor must be payable or non-payable, but is "pure".
|
|
||||||
|
Loading…
Reference in New Issue
Block a user