Skip to content

Some of the tests for the Null-aware element language feature needs an update to reflect the Analyzer warnings #2945

@chloestefantsova

Description

@chloestefantsova

The following tests need to be updated to include the locations of the warnings soon to be reported by the Analyzer for the cases where a null-aware element or a map entry is of non-nullable static type.

co19/LanguageFeatures/Control-flow-collections/Null-aware-elements/syntax_A05_t02

- Line 32, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 39, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 46, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 47, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 52, column 19: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 57, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 57, column 21: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 58, column 23: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

co19/LanguageFeatures/Control-flow-collections/Null-aware-elements/syntax_A05_t04

unexpected analysis errors in syntax_A05_t04.dart:
- Line 65, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

co19/LanguageFeatures/Control-flow-collections/Null-aware-elements/syntax_parenthesized_A01_t01

unexpected analysis errors in syntax_parenthesized_A01_t01.dart:
- Line 46, column 12: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

co19/LanguageFeatures/Control-flow-collections/Null-aware-elements/syntax_unary_prefix_A01_t01

unexpected analysis errors in syntax_unary_prefix_A01_t01.dart:
- Line 48, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 49, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 50, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 51, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 56, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 57, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 58, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 59, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 64, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 65, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 66, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 67, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 68, column 8: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 69, column 8: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 70, column 8: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 71, column 8: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 76, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 76, column 12: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 77, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 77, column 12: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 78, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 78, column 12: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 79, column 5: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

- Line 79, column 12: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

co19/LanguageFeatures/Control-flow-collections/Null-aware-elements/type_inference_map_A06_t01

unexpected analysis errors in type_inference_map_A06_t01.dart:
- Line 63, column 59: STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
  The receiver can't be null, so the null-aware operator '?' is unnecessary.

Metadata

Metadata

Assignees

Labels

type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions