inherit_variables_03.sol 436 B

123456789101112131415161718
  1. abstract contract a {
  2. int private foo;
  3. }
  4. abstract contract b is a {
  5. int public foo;
  6. }
  7. contract c is b {
  8. function getFoo() public returns (int) {
  9. return foo;
  10. }
  11. }
  12. // ---- Expect: diagnostics ----
  13. // warning: 3:13-28: storage variable 'foo' has never been used
  14. // warning: 11:13-51: function can be declared 'view'