solidity/test/libsolidity/syntaxTests/inheritance/override/add_view.sol

6 lines
275 B
Solidity
Raw Normal View History

2019-11-05 17:25:34 +00:00
contract B { function f() virtual public {} }
contract C is B { function f() public view {} }
// ----
2019-11-05 17:25:34 +00:00
// TypeError: (64-91): Overriding function is missing 'override' specifier.
// TypeError: (64-91): Overriding function changes state mutability from "nonpayable" to "view".