Skip to content

Incorrect constructor renaming when factory class implements the interface #521

Closed
@ghost

Description

language tests: FactoryImplementationTest.dart

interface A factory B {
  A(int x, int y);
}

// new A() invokes B constructor because B implements A.
class B implements A {
  final int x;
  final int y;

  B(this.x, this.y);
  
// This factory will never be invoked.
  factory A(int a, int b) { return new B(0, 0); }

}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Incorrect constructor renaming when factory class implements the interface · Issue #521 · dart-lang/sdk