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

5 lines
191 B
Solidity

contract B { function f() public {} }
contract C is B { function f() public view {} }
// ----
// TypeError: (56-83): Overriding function changes state mutability from "nonpayable" to "view".