mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow override with non-public state variables
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
contract C1 {
|
||||
function f() external pure returns(int) { return 42; }
|
||||
}
|
||||
|
||||
contract C is C1 {
|
||||
int override f;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (96-110): Override can only be used with public state variables.
|
||||
Reference in New Issue
Block a user