aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/visibility
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/visibility')
-rw-r--r--test/libsolidity/syntaxTests/visibility/function_no_visibility.sol5
-rw-r--r--test/libsolidity/syntaxTests/visibility/function_no_visibility_050.sol6
-rw-r--r--test/libsolidity/syntaxTests/visibility/interface/function_default.sol5
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.