Closed
Description
Hi, our users reported a strange null check exception dart-code-checker/dart-code-metrics#1098 and after looking at source code I'm not sure that this is the expected behaviour https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/lib/src/dart/element/member.dart#L624. I've also asked for the code example that produced the exception.
Also, the Element class declares the source property as nullable.
@bwilkerson @scheglov could you please take a look?