diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/visibility/interface')
-rw-r--r-- | test/libsolidity/syntaxTests/visibility/interface/function_default.sol | 6 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/visibility/interface/function_default050.sol | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol new file mode 100644 index 00000000..9889d038 --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol @@ -0,0 +1,6 @@ +interface I { + function f(); +} +// ---- +// Warning: Functions in interfaces should be declared external. +// Warning: No visibility specified. Defaulting to "external". diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_default050.sol b/test/libsolidity/syntaxTests/visibility/interface/function_default050.sol new file mode 100644 index 00000000..127d4e92 --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/interface/function_default050.sol @@ -0,0 +1,7 @@ +pragma experimental "v0.5.0"; +interface I { + function f(); +} +// ---- +// SyntaxError: No visibility specified. +// TypeError: Functions in interfaces must be declared external. |