[cfe] LibraryIndex
throws when getting instance members that have name collisions with named constructors #59910
Open
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