Skip to content

[cfe] [extension types] Implement 'precludes' rule to eliminate method/setter conflicts #53720

Closed
@eernstg

Description

@eernstg

This is the CFE specific issue for #53717. Consider the following example (which was taken from #53717):

extension type E1(int i) {
  set m(_) {}
}

extension type E2(int i) implements E1 {
  void m() {}
}

void main() {
  E2(1).m = 10;
}

The common front end does not report any errors for this program, but it should report a compile-time error at the declaration of void m() {} (or nearby), because E2 has a setter named m= and an instance method named m, cf. [1] and [2]).

Metadata

Metadata

Assignees

Labels

cfe-feature-extension-typesImplement extension types feature in the CFElegacy-area-front-endLegacy: Use area-dart-model instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions