Skip to content

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

@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 bugunimplemented-private-membersAbout soundness issues caused by instance members that have no implementation due to privacy.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions