diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/visibility/interface')
-rw-r--r-- | test/libsolidity/syntaxTests/visibility/interface/function_default.sol | 2 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol | 10 |
2 files changed, 11 insertions, 1 deletions
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. |