Closed
Description
The specification currently says: "It’s a compile-time error if such a mixin application introduces any instance variables. We need to be able to call an implementation specific superclass const constructor of Enum, and a mixin application of a mixin with a field does not make its forwarding constructor const. Currently that’s the only restriction, but if we add further restrictions on mixin applications having const forwarding constructors, those should also apply here." So, it seems to me that there is no exception for final
fields.
FAILED: dart2analyzer-none release_x64 co19/LanguageFeatures/Enhanced-Enum/semantics_A03_t05
Expected: Pass
Actual: CompileTimeError
--- Command "dart2analyzer" (took 65ms):
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_A03_t05.dart
unexpected analysis errors in semantics_A03_t05.dart:
- Line 42, column 13: COMPILE_TIME_ERROR.ENUM_MIXIN_WITH_INSTANCE_VARIABLE
Mixins applied to enums can't have instance variables.
- Line 42, column 17: COMPILE_TIME_ERROR.ENUM_MIXIN_WITH_INSTANCE_VARIABLE
Mixins applied to enums can't have instance variables.
unexpected analysis errors in ../../Utils/expect_common.dart:
- Line 253, column 11: TODO.TODO
TODO check that key sets are equivalent.
--- Re-run this test:
python3 tools/test.py -m release -c dart2analyzer co19/LanguageFeatures/Enhanced-Enum/semantics_A03_t05
Metadata
Metadata
Assignees
Labels
No labels