diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/syntaxTests/fallback/default_visibility.sol | 4 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/visibility/interface/function_default.sol | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/test/libsolidity/syntaxTests/fallback/default_visibility.sol b/test/libsolidity/syntaxTests/fallback/default_visibility.sol index aeb23d2e..2cb0af90 100644 --- a/test/libsolidity/syntaxTests/fallback/default_visibility.sol +++ b/test/libsolidity/syntaxTests/fallback/default_visibility.sol @@ -1,4 +1,6 @@ contract C { // Check that visibility is also enforced for the fallback function. - function() public {} + function() {} } +// ---- +// Warning: (90-103): No visibility specified. Defaulting to "public". diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol index de4ee9d0..72ce3b40 100644 --- a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol +++ b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol @@ -1,3 +1,6 @@ interface I { - function f() external; + function f(); } +// ---- +// 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. |