Skip to content

[cfe] LibraryIndex throws when getting instance members that have name collisions with named constructors #59910

Open
@nshahan

Description

If you have a simple class like this:

class C {
  int foo = 10;
  C.foo();
}

and compile it to a component, then try to access the field via a library index:

var index = LibraryIndex(component, ['example.dart']);
index.getField('example.dart', 'C', 'foo');

You get an error message like this:

  Member 'foo' in class 'C' in library 'example.dart' is not a Field: C.foo (Constructor).

cc @jensjoha

Metadata

Assignees

Labels

area-front-endUse area-front-end for front end / CFE / kernel format related issues.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions