diff options
author | Erik Kundt <bitshift@posteo.org> | 2018-07-04 17:47:35 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-07-04 17:47:35 +0800 |
commit | 0dd3e6052cfe3ab76376758eeeebcd379ff8b538 (patch) | |
tree | f4105db0065c252abb4d5781f19d5df554fa37de /test/libsolidity/syntaxTests | |
parent | 2e0d019ef09ac4f168a4e528f8b4a051a942a479 (diff) | |
download | dexon-solidity-0dd3e6052cfe3ab76376758eeeebcd379ff8b538.tar.gz dexon-solidity-0dd3e6052cfe3ab76376758eeeebcd379ff8b538.tar.zst dexon-solidity-0dd3e6052cfe3ab76376758eeeebcd379ff8b538.zip |
Fixes broken syntax tests.
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r-- | test/libsolidity/syntaxTests/constructor/constructor_state_mutability_new.sol | 10 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/constructor/constructor_state_mutability_old.sol | 17 |
2 files changed, 9 insertions, 18 deletions
diff --git a/test/libsolidity/syntaxTests/constructor/constructor_state_mutability_new.sol b/test/libsolidity/syntaxTests/constructor/constructor_state_mutability_new.sol index c247afb9..39bf6384 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_state_mutability_new.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_state_mutability_new.sol @@ -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". diff --git a/test/libsolidity/syntaxTests/constructor/constructor_state_mutability_old.sol b/test/libsolidity/syntaxTests/constructor/constructor_state_mutability_old.sol index 1e3031ec..b9f2a4bb 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_state_mutability_old.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_state_mutability_old.sol @@ -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". |