aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/visibility
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-07-11 04:43:02 +0800
committerErik Kundt <bitshift@posteo.org>2018-07-18 00:07:36 +0800
commitdfd2fee91d2d6158dc11146ddc1773ac5eb12c6a (patch)
treee60abadf72ff9ed8778f98384948a81700247270 /test/libsolidity/syntaxTests/visibility
parent75bba5c9f02df281c667b77db01594c5c7eb823d (diff)
downloaddexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.tar
dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.tar.gz
dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.tar.bz2
dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.tar.lz
dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.tar.xz
dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.tar.zst
dexon-solidity-dfd2fee91d2d6158dc11146ddc1773ac5eb12c6a.zip
Suggests external for fallback and interface functions.
Diffstat (limited to 'test/libsolidity/syntaxTests/visibility')
-rw-r--r--test/libsolidity/syntaxTests/visibility/function_no_visibility.sol2
-rw-r--r--test/libsolidity/syntaxTests/visibility/interface/function_default.sol2
-rw-r--r--test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol10
3 files changed, 12 insertions, 2 deletions
diff --git a/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol b/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol
index 63800381..4fc7900f 100644
--- a/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol
+++ b/test/libsolidity/syntaxTests/visibility/function_no_visibility.sol
@@ -2,4 +2,4 @@ contract C {
function f() pure { }
}
// ----
-// SyntaxError: (17-38): No visibility specified.
+// SyntaxError: (17-38): No visibility specified. Did you intend to add "public"?
diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol
index 791ba87e..b7e96e5e 100644
--- a/test/libsolidity/syntaxTests/visibility/interface/function_default.sol
+++ b/test/libsolidity/syntaxTests/visibility/interface/function_default.sol
@@ -2,5 +2,5 @@ interface I {
function f();
}
// ----
-// SyntaxError: (15-28): No visibility specified. Did you intend to add "public"?
+// SyntaxError: (15-28): No visibility specified. Did you intend to add "external"?
// TypeError: (15-28): Functions in interfaces must be declared external.
diff --git a/test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol b/test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol
new file mode 100644
index 00000000..5d72376f
--- /dev/null
+++ b/test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol
@@ -0,0 +1,10 @@
+interface I {
+ function f();
+}
+contract C {
+ function g();
+}
+// ----
+// SyntaxError: (18-31): No visibility specified. Did you intend to add "external"?
+// SyntaxError: (51-64): No visibility specified. Did you intend to add "public"?
+// TypeError: (18-31): Functions in interfaces must be declared external.