Skip to content

Invalid co19 enum test #34440

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

Closed
2 tasks
danrubel opened this issue Sep 11, 2018 · 2 comments
Closed
2 tasks

Invalid co19 enum test #34440

danrubel opened this issue Sep 11, 2018 · 2 comments
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).

Comments

@danrubel
Copy link

These co19 tests assert that two consecutive commas tokens in an enum declaration is valid, but I don't believe that it is valid.

  • Language/Enums/syntax_t08: CompileTimeError
  • Language/Enums/syntax_t09: CompileTimeError
enum E {a,, b}
@lrhn
Copy link
Member

lrhn commented Sep 14, 2018

It is not valid.

Both tests contain the comment @compile-error, so the test expects a compile-time error.

Are the tests failing anywhere?

@eernstg
Copy link
Member

eernstg commented Sep 14, 2018

I get this from current master SDK tests/co19_2/src:

> grep -i error Language/Enums/syntax_t0[89].dart
Language/Enums/syntax_t08.dart: * @description Checks that it no compile error if declared constant values
Language/Enums/syntax_t09.dart: * @description Checks that it is no compile error if enum has more then one

I don't like then ;-), but I also don't see any occurrences of @compile-error, so it seems to be a missing fix in the Dart 2 tests. Perhaps the fix was made in the Dart 1 tests after the Dart 2 tests were created (as a copy/adjust operation from the former).

@vsmenon vsmenon added the area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). label Sep 20, 2018
@lrhn lrhn closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Projects
None yet
Development

No branches or pull requests

4 participants