mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Suggests external for fallback and interface functions.
This commit is contained in:
@@ -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"?
|
||||
|
||||
@@ -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.
|
||||
|
||||
+10
@@ -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.
|
||||
Reference in New Issue
Block a user