call_inherited_function.sol 423 B

12345678910111213141516
  1. abstract contract base {
  2. function foo() private returns (uint64) {
  3. return 102;
  4. }
  5. }
  6. contract apex is base {
  7. function bar() public returns (uint64) {
  8. return foo() + 3;
  9. }
  10. }
  11. // ---- Expect: diagnostics ----
  12. // error: 10:24-29: cannot call private function
  13. // note 3:13-52: declaration of function 'foo'