diff options
author | chriseth <chris@ethereum.org> | 2018-07-09 23:53:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-09 23:53:23 +0800 |
commit | e950fd434aa4394e669c7277ba229595e0a4bc08 (patch) | |
tree | b2d64fb98ab24ec12addc5ae0a773de5578f437c /test/libsolidity/syntaxTests/nameAndTypeResolution | |
parent | 694754b4fe410abfa0661e29dd3e6d4d1ea1283e (diff) | |
parent | 19f6b5ad05a20800babca49bfea25d3fadf46906 (diff) | |
download | dexon-solidity-e950fd434aa4394e669c7277ba229595e0a4bc08.tar dexon-solidity-e950fd434aa4394e669c7277ba229595e0a4bc08.tar.gz dexon-solidity-e950fd434aa4394e669c7277ba229595e0a4bc08.tar.bz2 dexon-solidity-e950fd434aa4394e669c7277ba229595e0a4bc08.tar.lz dexon-solidity-e950fd434aa4394e669c7277ba229595e0a4bc08.tar.xz dexon-solidity-e950fd434aa4394e669c7277ba229595e0a4bc08.tar.zst dexon-solidity-e950fd434aa4394e669c7277ba229595e0a4bc08.zip |
Merge pull request #4403 from ethereum/syntaxTestsVisibility
Specify default visibility in syntax tests (pt. 2)
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution')
12 files changed, 22 insertions, 22 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/029_create_abstract_contract.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/029_create_abstract_contract.sol index 3a2bf56d..455f4189 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/029_create_abstract_contract.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/029_create_abstract_contract.sol @@ -1,7 +1,7 @@ -contract base { function foo(); } +contract base { function foo() public; } contract derived { base b; function foo() public { b = new base(); } } // ---- -// TypeError: (97-105): Trying to create an instance of an abstract contract. +// TypeError: (104-112): Trying to create an instance of an abstract contract. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/030_redeclare_implemented_abstract_function_as_abstract.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/030_redeclare_implemented_abstract_function_as_abstract.sol index 05bc4bc7..55bdea89 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/030_redeclare_implemented_abstract_function_as_abstract.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/030_redeclare_implemented_abstract_function_as_abstract.sol @@ -1,5 +1,5 @@ -contract base { function foo(); } +contract base { function foo() public; } contract derived is base { function foo() public {} } -contract wrong is derived { function foo(); } +contract wrong is derived { function foo() public; } // ---- -// TypeError: (116-131): Redeclaring an already implemented function as abstract +// TypeError: (123-145): Redeclaring an already implemented function as abstract diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/039_functions_with_identical_structs_in_interface.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/039_functions_with_identical_structs_in_interface.sol index 0be0bb2b..851ccf89 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/039_functions_with_identical_structs_in_interface.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/039_functions_with_identical_structs_in_interface.sol @@ -3,9 +3,9 @@ pragma experimental ABIEncoderV2; contract C { struct S1 { int i; } struct S2 { int i; } - function f(S1) pure {} - function f(S2) pure {} + function f(S1) public pure {} + function f(S2) public pure {} } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (129-151): Function overload clash during conversion to external types for arguments. +// TypeError: (136-165): Function overload clash during conversion to external types for arguments. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol index f9937fb9..775258c2 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol @@ -2,7 +2,7 @@ pragma experimental ABIEncoderV2; contract C { struct S { function() internal a; } - function f(S) {} + function f(S) public {} } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol index d9c3bfc4..4a95430f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol @@ -2,7 +2,7 @@ pragma experimental ABIEncoderV2; contract C { struct S { mapping(uint => uint) a; } - function f(S) {} + function f(S) public {} } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol index f223cf53..09cd38b5 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol @@ -3,7 +3,7 @@ pragma experimental ABIEncoderV2; contract C { struct T { mapping(uint => uint) a; } struct S { T[][2] b; } - function f(S) {} + function f(S) public {} } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/138_similar_name_suggestions_expected.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/138_similar_name_suggestions_expected.sol index 8f11f003..ef6e933a 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/138_similar_name_suggestions_expected.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/138_similar_name_suggestions_expected.sol @@ -1,6 +1,6 @@ contract c { - function func() {} + function func() public {} function g() public { fun(); } } // ---- -// DeclarationError: (62-65): Undeclared identifier. Did you mean "func"? +// DeclarationError: (69-72): Undeclared identifier. Did you mean "func"? diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol index 4cd1fcae..27381904 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol @@ -1,5 +1,5 @@ contract C { - constructor() { } + constructor() public { } } contract D { function f() public returns (uint) { @@ -8,4 +8,4 @@ contract D { } } // ---- -// TypeError: (99-112): Member "value" not found or not visible after argument-dependent lookup in function () returns (contract C) - did you forget the "payable" modifier? +// TypeError: (106-119): Member "value" not found or not visible after argument-dependent lookup in function () returns (contract C) - did you forget the "payable" modifier? diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol index 979f0eb6..8e5d81e2 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol @@ -4,7 +4,7 @@ contract C { ftring a; } S public s; - function s() s { + function s() public s { } } // ---- diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol index 76c3fcd6..9ed2b70f 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol @@ -1,7 +1,7 @@ contract C { - function f() view returns (bytes4) { + function f() public view returns (bytes4) { return f.selector; } } // ---- -// TypeError: (69-79): Member "selector" not found or not visible after argument-dependent lookup in function () view returns (bytes4) +// TypeError: (76-86): Member "selector" not found or not visible after argument-dependent lookup in function () view returns (bytes4) diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol index b21a5d3d..0876a4f7 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol @@ -1,9 +1,9 @@ contract C { function g() pure internal { } - function f() view returns (bytes4) { + function f() public view returns (bytes4) { return g.selector; } } // ---- -// TypeError: (108-118): Member "selector" not found or not visible after argument-dependent lookup in function () pure +// TypeError: (115-125): Member "selector" not found or not visible after argument-dependent lookup in function () pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol index 3567c44f..d0ccc724 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol @@ -1,8 +1,8 @@ contract C { - function f() view returns (bytes4) { + function f() public view returns (bytes4) { function () g; return g.selector; } } // ---- -// TypeError: (92-102): Member "selector" not found or not visible after argument-dependent lookup in function () +// TypeError: (99-109): Member "selector" not found or not visible after argument-dependent lookup in function () |