Skip to content

co19/LanguageFeatures/Enhanced-Enum/semantics_A01_t05 #1288

Closed
@scheglov

Description

@scheglov

According to a recently updated specification, it is illegal to declare a non-abstract instance member named index: "It's a compile-time error if a class, mixin or enum declaration has Enum as a superinterface, and it declares a non-abstract instance member named index. That member would override the index getter inherited from Enum, and we currently do not allow that."

FAILED: dart2analyzer-none release_x64 co19/LanguageFeatures/Enhanced-Enum/semantics_A01_t05
Expected: Pass
Actual: MissingCompileTimeError

--- Command "dart2analyzer" (took 35ms):
DART_CONFIGURATION=ReleaseX64 sdk/bin/dartanalyzer -Dtest_runner.configuration=custom-configuration-1 --enable-experiment=enhanced-enums --ignore-unrecognized-flags --packages=/Users/scheglov/Source/Dart/sdk.git/sdk/.packages --format=json --no-hints /Users/scheglov/Source/Dart/sdk.git/sdk/tests/co19/src/LanguageFeatures/Enhanced-Enum/semantics_A01_t05.dart

static error failures:
- Unexpected error at line 43, column 13, length 5: COMPILE_TIME_ERROR.ILLEGAL_NON_ABSTRACT_ENUM_INDEX

--- Re-run this test:
python3 tools/test.py -m release -c dart2analyzer co19/LanguageFeatures/Enhanced-Enum/semantics_A01_t05

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions