Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

co19/LanguageFeatures/Enhanced-Enum/factory_constructor_A01_t02 #2389

Closed
scheglov opened this issue Nov 21, 2023 · 2 comments
Closed

co19/LanguageFeatures/Enhanced-Enum/factory_constructor_A01_t02 #2389

scheglov opened this issue Nov 21, 2023 · 2 comments
Assignees
Labels
bad-test Report tests in need of updates. When closed, the tests should be considered good

Comments

@scheglov
Copy link

Note

FAILED: dart2analyzer-none release_arm64 co19/LanguageFeatures/Enhanced-Enum/factory_constructor_A01_t02
Expected: Pass
Actual: MissingCompileTimeError

--- Command "dart2analyzer" (took 689ms):
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=inline-class --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/Enhanced-Enum/factory_constructor_A01_t02.dart

static error failures:
- Unexpected error at line 26, column 9, length 2: COMPILE_TIME_ERROR.RECURSIVE_CONSTANT_CONSTRUCTOR

--- Re-run this test:
python3 tools/test.py -m release -c dart2analyzer -a arm64 co19/LanguageFeatures/Enhanced-Enum/factory_constructor_A01_t02
enum E {
  e1.foo();
//   ^^^
// [analyzer] unspecified
// [cfe] unspecified

  const E();
  const factory E.foo() = ET.foo;
}

extension type const ET(E it) implements E {
  const ET.foo() : this(E.e1);
}
@eernstg
Copy link
Member

eernstg commented Nov 21, 2023

I guess it's a matter of convenience: The analyzer could report that the declaration of E.e1 has a cyclic dependency, or it could report that it is an error (a brand new one, btw) that e1.foo() implicitly invokes a factory constructor (it must be a generative constructor), or it could report both.

@scheglov
Copy link
Author

Yes, https://dart-review.googlesource.com/c/sdk/+/337608 will report this new error, here and in factory_constructor_A01_t01. But here we also have the generic constant cycle error.

@sgrekhov sgrekhov self-assigned this Nov 22, 2023
@sgrekhov sgrekhov added the bad-test Report tests in need of updates. When closed, the tests should be considered good label Nov 22, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Nov 24, 2023
2023-11-23 [email protected] Merge pull request dart-lang/co19#2395 from dart-lang/merge-pre-nnbd
2023-11-23 [email protected] Fixes dart-lang/co19#2390. Fix tests according to the new method/setter rules (dart-lang/co19#2392)
2023-11-23 [email protected] Fixes dart-lang/co19#2388. Add tests for the new method/setter rules. Update assertions (dart-lang/co19#2393)
2023-11-23 [email protected] Merge remote-tracking branch 'origin/pre-nnbd' into master
2023-11-22 [email protected] Fixes dart-lang/co19#2389. Add additional error expectation for analyzer (dart-lang/co19#2391)
2023-11-21 [email protected] dart-lang/co19#2342. Update nullability tests according to the new rules (dart-lang/co19#2385)
2023-11-21 [email protected] Fixes dart-lang/co19#2384. Fix not well-bound extension types. Add function-type dynamic test (dart-lang/co19#2387)

Change-Id: Ic3848f6f39fd42b01bfed5feac3d922c6f5a53d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338120
Reviewed-by: Erik Ernst <[email protected]>
Reviewed-by: Alexander Thomas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad-test Report tests in need of updates. When closed, the tests should be considered good
Projects
None yet
Development

No branches or pull requests

3 participants