inherit_variables.sol 289 B

12345678910111213
  1. abstract contract b {
  2. int foo;
  3. }
  4. contract c is b {
  5. function getFoo() public returns (int) {
  6. return foo;
  7. }
  8. }
  9. // ---- Expect: diagnostics ----
  10. // warning: 7:13-51: function can be declared 'view'