solidity/test/libsolidity/syntaxTests/inheritance/override/change_return_types_in_interface.sol
2019-10-30 17:31:33 +01:00

12 lines
385 B
Solidity

interface I {
function f() external pure returns (uint);
}
contract B is I {
// The compiler used to have a bug where changing
// the return type was fine in this situation.
function f() public pure returns (uint, uint) {}
}
// ----
// TypeError: (182-230): Overriding function is missing 'override' specifier.
// TypeError: (182-230): Overriding function return types differ.