aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-07-02 23:47:48 +0800
committerErik Kundt <bitshift@posteo.org>2018-07-04 16:45:59 +0800
commit2e0d019ef09ac4f168a4e528f8b4a051a942a479 (patch)
treeeff18ba14670133da9c777fb446bc94e2ea0a2cb /test/libsolidity/syntaxTests/nameAndTypeResolution
parent533d5d4b1cc4374decc704de8c86ad4cef6214fc (diff)
downloaddexon-solidity-2e0d019ef09ac4f168a4e528f8b4a051a942a479.tar
dexon-solidity-2e0d019ef09ac4f168a4e528f8b4a051a942a479.tar.gz
dexon-solidity-2e0d019ef09ac4f168a4e528f8b4a051a942a479.tar.bz2
dexon-solidity-2e0d019ef09ac4f168a4e528f8b4a051a942a479.tar.lz
dexon-solidity-2e0d019ef09ac4f168a4e528f8b4a051a942a479.tar.xz
dexon-solidity-2e0d019ef09ac4f168a4e528f8b4a051a942a479.tar.zst
dexon-solidity-2e0d019ef09ac4f168a4e528f8b4a051a942a479.zip
Adds default visibility specifier to syntax tests.
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution')
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/029_create_abstract_contract.sol4
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/030_redeclare_implemented_abstract_function_as_abstract.sol6
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/039_functions_with_identical_structs_in_interface.sol6
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol2
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol2
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol2
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/138_similar_name_suggestions_expected.sol4
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol4
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/412_early_exit_on_fatal_errors.sol2
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/484_function_types_selector_1.sol4
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/485_function_types_selector_2.sol4
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/486_function_types_selector_3.sol4
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 ()