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/syntaxTests/visibility/interface | |
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/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. |