diff options
author | Erik Kundt <bitshift@posteo.org> | 2018-06-29 20:55:44 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-06-29 22:26:18 +0800 |
commit | f3ca0685feb4b8d499914a3c1ff9432d4cef4b7e (patch) | |
tree | 4e28ae068e58badda1f684617d661990a2dec850 /test/libsolidity/syntaxTests/visibility | |
parent | e289c36158701ba0b874051e9e426e270b0e38e2 (diff) | |
download | dexon-solidity-f3ca0685feb4b8d499914a3c1ff9432d4cef4b7e.tar dexon-solidity-f3ca0685feb4b8d499914a3c1ff9432d4cef4b7e.tar.gz dexon-solidity-f3ca0685feb4b8d499914a3c1ff9432d4cef4b7e.tar.bz2 dexon-solidity-f3ca0685feb4b8d499914a3c1ff9432d4cef4b7e.tar.lz dexon-solidity-f3ca0685feb4b8d499914a3c1ff9432d4cef4b7e.tar.xz dexon-solidity-f3ca0685feb4b8d499914a3c1ff9432d4cef4b7e.tar.zst dexon-solidity-f3ca0685feb4b8d499914a3c1ff9432d4cef4b7e.zip |
Updates syntax tests to specify default visibility.
Diffstat (limited to 'test/libsolidity/syntaxTests/visibility')
3 files changed, 12 insertions, 4 deletions
diff --git a/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol b/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol new file mode 100644 index 00000000..7330ef8d --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol @@ -0,0 +1,5 @@ +contract C { + function f() pure { } +} +// ---- +// Warning: (17-38): No visibility specified. Defaulting to "public". diff --git a/test/libsolidity/syntaxTests/visibility/function_no_visibility_050.sol b/test/libsolidity/syntaxTests/visibility/function_no_visibility_050.sol new file mode 100644 index 00000000..ec7c0937 --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/function_no_visibility_050.sol @@ -0,0 +1,6 @@ +pragma experimental "v0.5.0"; +contract C { + function f() pure { } +} +// ---- +// SyntaxError: (47-68): No visibility specified. diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol index 72ce3b40..de4ee9d0 100644 --- a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol +++ b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol @@ -1,6 +1,3 @@ interface I { - function f(); + function f() external; } -// ---- -// Warning: (15-28): Functions in interfaces should be declared external. -// Warning: (15-28): No visibility specified. Defaulting to "public". In interfaces it defaults to external. |