From dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 10 Jul 2018 22:43:02 +0200 Subject: Suggests external for fallback and interface functions. --- .../syntaxTests/visibility/function_no_visibility.sol | 2 +- .../syntaxTests/visibility/interface/function_default.sol | 2 +- .../interface/interface_contract_function_default.sol | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol (limited to 'test/libsolidity/syntaxTests/visibility') 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. -- cgit v1.2.3