solidity/test/libsolidity/syntaxTests/visibility/interface/interface_contract_function_default.sol
2019-11-01 14:54:47 -05:00

14 lines
529 B
Solidity

// State of the syntax checker has to be reset after the interface
// was visited. The suggested visibility for g() should not be external.
interface I {
function f();
}
contract C {
function g();
}
// ----
// SyntaxError: (158-171): No visibility specified. Did you intend to add "external"?
// SyntaxError: (191-204): No visibility specified. Did you intend to add "public"?
// TypeError: (174-206): Contract "C" should be marked as abstract.
// TypeError: (158-171): Functions in interfaces must be declared external.