Skip to content

co19/LanguageFeatures/Patterns/wildcards_A01_t02 #1703

@scheglov

Description

@scheglov
FAILED: dart2analyzer-none release_arm64 co19/LanguageFeatures/Patterns/wildcards_A01_t02
Expected: Pass
Actual: CompileTimeError

--- Command "dart2analyzer" (took 06.000180s):
DART_CONFIGURATION=ReleaseARM64 sdk/bin/dart --packages=.dart_tool/package_config.json pkg/analyzer_cli/bin/analyzer.dart --use-analysis-driver-memory-byte-store --dart-sdk=/Users/scheglov/Source/Dart/sdk.git/sdk/sdk -Dtest_runner.configuration=custom-configuration-1 --enable-experiment=patterns --ignore-unrecognized-flags --packages=/Users/scheglov/Source/Dart/sdk.git/sdk/.dart_tool/package_config.json --format=json /Users/scheglov/Source/Dart/sdk.git/sdk/tests/co19/src/LanguageFeatures/Patterns/wildcards_A01_t02.dart

unexpected analysis errors in wildcards_A01_t02.dart:
- Line 64, column 16: COMPILE_TIME_ERROR.NON_CONSTANT_MAP_PATTERN_KEY
  Key expressions in map patterns must be constants.

- Line 64, column 16: COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
  Undefined name '_'.

- Line 68, column 15: COMPILE_TIME_ERROR.PATTERN_TYPE_MISMATCH_IN_IRREFUTABLE_CONTEXT
  The matched value of type 'int' isn't assignable to the required type 'String'.

- Line 71, column 23: COMPILE_TIME_ERROR.PATTERN_TYPE_MISMATCH_IN_IRREFUTABLE_CONTEXT
  The matched value of type 'int' isn't assignable to the required type 'String'.

--- Re-run this test:
python3 tools/test.py -m release -c dart2analyzer -a arm64 co19/LanguageFeatures/Patterns/wildcards_A01_t02

The key in map pattern entries must be a constant expression, not a pattern. So, using _ is not right there.

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