Skip to content

[analyzer] Unhandled exception: Null check operator used on a null value #50660

Closed
@incendial

Description

@incendial

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.
Screenshot 2022-12-08 at 19 20 07

@bwilkerson @scheglov could you please take a look?

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp 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