Skip to content

Class can claim to implement an interface even if the other has privates #25462

Closed
@Hixie

Description

@Hixie

File A:

class A {
  void public() { }
  void _private() { }
}
void test (A x) { x._private(); }

File B:

import 'A';
class B implements A {
  void public() { }
}
void main() {
  test(new B());
}

This code has no analyzer warnings, despite being guaranteed to crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions