Fixes broken syntax tests.

This commit is contained in:
Erik Kundt 2018-07-04 11:47:35 +02:00
parent 2e0d019ef0
commit 0dd3e6052c
2 changed files with 9 additions and 18 deletions

View File

@ -1,13 +1,9 @@
contract test1 {
constructor() public constant {}
}
contract test2 {
constructor() public view {}
}
contract test3 {
contract test2 {
constructor() public pure {}
}
// ----
// TypeError: (19-51): Constructor must be payable or non-payable, but is "view".
// TypeError: (73-101): Constructor must be payable or non-payable, but is "view".
// TypeError: (123-151): Constructor must be payable or non-payable, but is "pure".
// TypeError: (19-47): Constructor must be payable or non-payable, but is "view".
// TypeError: (69-97): Constructor must be payable or non-payable, but is "pure".

View File

@ -1,16 +1,11 @@
contract test1 {
function test1() public constant {}
function test1() public view {}
}
contract test2 {
function test2() public view {}
}
contract test3 {
function test3() public pure {}
function test2() public pure {}
}
// ----
// Warning: (21-56): 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: (135-166): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
// TypeError: (21-56): Constructor must be payable or non-payable, but is "view".
// 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".
// Warning: (21-52): 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.
// TypeError: (21-52): Constructor must be payable or non-payable, but is "view".
// TypeError: (76-107): Constructor must be payable or non-payable, but is "pure".