Skip to content

Tests with STATIC_WARNING.UNNECESSARY_NULL_ASSERT_PATTERN #1734

@scheglov

Description

@scheglov

With https://dart-review.googlesource.com/c/sdk/+/278687 the following test started passing

co19/LanguageFeatures/Patterns/record_A02_t03

but these tests started failing

co19/LanguageFeatures/Patterns/switch_statement_A07_t02
co19/LanguageFeatures/Patterns/list_A05_t05
co19/LanguageFeatures/Patterns/switch_statement_A07_t01

There might be other tests that are currently failing with the analyzer, which also have such unnecessary patterns, but because these tests are already failing, we don't see them yet. I will report them later then.

I believe the specification does not describe warnings for unnecessary null-assert and null-check patterns, but I think @munificent reacted positively to implementing them, so they might be added to the spec.

Metadata

Metadata

Assignees

Labels

bad-testReport tests in need of updates. When closed, the tests should be considered good

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions