Disallow override with non-public state variables

This commit is contained in:
Mathias Baumann
2020-06-03 14:03:26 +02:00
parent ecc9f84f2f
commit 6f8b5fe53b
3 changed files with 15 additions and 0 deletions
@@ -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.