Skip to content

False warning of dead_null_aware_expression when using map pattern #57060

@jtdLab

Description

@jtdLab

When using this code:

foo.dart

final map <String,dynamic>{}

bar.dart

if (map case {'language': String? language}) {
  language ??= 'en';
}

a dead_null_aware_expression is reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-infoWe need additional information from the issue author (auto-closed after 14 days if no response)triage-automationSee https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot.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