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:
@@ -1,3 +1,3 @@
|
||||
contract A { constructor() {} }
|
||||
// ----
|
||||
// SyntaxError: (13-29): No visibility specified.
|
||||
// SyntaxError: (13-29): No visibility specified. Did you intend to add "public"?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pragma experimental "v0.5.0";
|
||||
contract A { constructor() {} }
|
||||
// ----
|
||||
// SyntaxError: (43-59): No visibility specified.
|
||||
// SyntaxError: (43-59): No visibility specified. Did you intend to add "public"?
|
||||
|
||||
@@ -3,5 +3,5 @@ contract C {
|
||||
function() {}
|
||||
}
|
||||
// ----
|
||||
// SyntaxError: (90-103): No visibility specified.
|
||||
// SyntaxError: (90-103): No visibility specified. Did you intend to add "external"?
|
||||
// TypeError: (90-103): Fallback function must be defined as "external".
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ contract C {
|
||||
function f() pure { }
|
||||
}
|
||||
// ----
|
||||
// SyntaxError: (47-68): No visibility specified.
|
||||
// SyntaxError: (47-68): No visibility specified. Did you intend to add "public"?
|
||||
|
||||
@@ -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