Skip to content

Dartc does not produce a warning when trying to call an inaccessible method #3266

Closed
@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


What steps will reproduce the problem?
There is a library:

library('lib');

class C {
  _method() {}
}

Run the following test with Dartc:

import('lib.dart');

class D extends C {
  test() {
    super._method(); //should be a static warning
  }
}

main() {
  C c;
  c._method(); //should be a static warning
}

What is the expected output? What do you see instead?
Expected: static warnings on the marked lines.
Actual: no static warnings

What version of the product are you using? On what operating system?
Dartc, r8026. OS Ubuntu 10.04

Please provide any additional information below.
Tests in co19: Language/10_Expressions/14_Method_Invocation/1_Ordinary_Invocation_A06_t02.dart
Language/10_Expressions/14_Method_Invocation/1_Super_Invocation_A06_t02.dart

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions