mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
enforce interface-functions to be external-declared
- libsolidity: Enforce interface-functions must be external-declared. - Changelog adapted to reflect changes wrt. functions in interfaces. - test: Adjustments according to prior interface-function changes. - tests: Adapting SolidityEndToEndTest to interface-function change. - docs: Adapted documentation to interface-function change.
This commit is contained in:
@@ -2,5 +2,4 @@ interface I {
|
||||
function f();
|
||||
}
|
||||
// ----
|
||||
// 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.
|
||||
// TypeError: (15-28): Functions in interfaces must be declared external.
|
||||
|
||||
@@ -2,4 +2,4 @@ interface I {
|
||||
function f() internal;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (15-37): Functions in interfaces cannot be internal or private.
|
||||
// TypeError: (15-37): Functions in interfaces must be declared external.
|
||||
|
||||
@@ -2,4 +2,4 @@ interface I {
|
||||
function f() private;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (15-36): Functions in interfaces cannot be internal or private.
|
||||
// TypeError: (15-36): Functions in interfaces must be declared external.
|
||||
|
||||
@@ -2,4 +2,4 @@ interface I {
|
||||
function f() public;
|
||||
}
|
||||
// ----
|
||||
// Warning: (15-35): Functions in interfaces should be declared external.
|
||||
// TypeError: (15-35): Functions in interfaces must be declared external.
|
||||
|
||||
Reference in New Issue
Block a user