diff options
author | chriseth <chris@ethereum.org> | 2018-07-11 04:43:02 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-07-18 00:07:36 +0800 |
commit | dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a (patch) | |
tree | e60abadf72ff9ed8778f98384948a81700247270 /test/libsolidity | |
parent | 75bba5c9f02df281c667b77db01594c5c7eb823d (diff) | |
download | dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.tar.gz dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.tar.zst dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.zip |
Suggests external for fallback and interface functions.
Diffstat (limited to 'test/libsolidity')
7 files changed, 16 insertions, 6 deletions
diff --git a/test/libsolidity/syntaxTests/constructor/constructor_no_visibility.sol b/test/libsolidity/syntaxTests/constructor/constructor_no_visibility.sol index 3835560a..586329b1 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_no_visibility.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_no_visibility.sol @@ -1,3 +1,3 @@ contract A { constructor() {} } // ---- -// SyntaxError: (13-29): No visibility specified. +// SyntaxError: (13-29): No visibility specified. Did you intend to add "public"? diff --git a/test/libsolidity/syntaxTests/constructor/constructor_no_visibility_050.sol b/test/libsolidity/syntaxTests/constructor/constructor_no_visibility_050.sol index 0f57a41f..9f60f0d8 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_no_visibility_050.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_no_visibility_050.sol @@ -1,4 +1,4 @@ pragma experimental "v0.5.0"; contract A { constructor() {} } // ---- -// SyntaxError: (43-59): No visibility specified. +// SyntaxError: (43-59): No visibility specified. Did you intend to add "public"? diff --git a/test/libsolidity/syntaxTests/fallback/default_visibility.sol b/test/libsolidity/syntaxTests/fallback/default_visibility.sol index 2199a99b..6fbb15a5 100644 --- a/test/libsolidity/syntaxTests/fallback/default_visibility.sol +++ b/test/libsolidity/syntaxTests/fallback/default_visibility.sol @@ -3,5 +3,5 @@ contract C { function() {} } // ---- -// SyntaxError: (90-103): No visibility specified. +// SyntaxError: (90-103): No visibility specified. Did you intend to add "external"? // TypeError: (90-103): Fallback function must be defined as "external". diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/567_require_visibility_specifiers_v050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/567_require_visibility_specifiers_v050.sol index ec7c0937..73a74219 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/567_require_visibility_specifiers_v050.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/567_require_visibility_specifiers_v050.sol @@ -3,4 +3,4 @@ contract C { function f() pure { } } // ---- -// SyntaxError: (47-68): No visibility specified. +// SyntaxError: (47-68): No visibility specified. Did you intend to add "public"? diff --git a/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol b/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol index 63800381..4fc7900f 100644 --- a/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol +++ b/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol @@ -2,4 +2,4 @@ contract C { function f() pure { } } // ---- -// SyntaxError: (17-38): No visibility specified. +// SyntaxError: (17-38): No visibility specified. Did you intend to add "public"? diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol index 791ba87e..b7e96e5e 100644 --- a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol +++ b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol @@ -2,5 +2,5 @@ interface I { function f(); } // ---- -// SyntaxError: (15-28): No visibility specified. Did you intend to add "public"? +// SyntaxError: (15-28): No visibility specified. Did you intend to add "external"? // TypeError: (15-28): Functions in interfaces must be declared external. diff --git a/test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol b/test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol new file mode 100644 index 00000000..5d72376f --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol @@ -0,0 +1,10 @@ +interface I { + function f(); +} +contract C { + function g(); +} +// ---- +// SyntaxError: (18-31): No visibility specified. Did you intend to add "external"? +// SyntaxError: (51-64): No visibility specified. Did you intend to add "public"? +// TypeError: (18-31): Functions in interfaces must be declared external. |