solidity/test/libsolidity/syntaxTests/modifiers/use_on_interface_function.sol
2022-04-01 23:41:18 -05:00

8 lines
275 B
Solidity

interface I {
function f() external m pure returns (uint);
modifier m() { _; }
}
// ----
// SyntaxError 5842: (16-60): Functions in interfaces cannot have modifiers.
// TypeError 6408: (63-82='modifier m() { _; }'): Modifiers cannot be defined or declared in interfaces.