From 8fe1cfb12ef49a74eaebed56d160e88cfd9a4de2 Mon Sep 17 00:00:00 2001 From: bitshift Date: Fri, 9 Mar 2018 17:38:17 +0100 Subject: Defaults to external visibility for interfaces. --- .../syntaxTests/visibility/interface/function_default.sol | 6 ++++++ .../syntaxTests/visibility/interface/function_default050.sol | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 test/libsolidity/syntaxTests/visibility/interface/function_default.sol create mode 100644 test/libsolidity/syntaxTests/visibility/interface/function_default050.sol (limited to 'test/libsolidity/syntaxTests/visibility') 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. -- cgit