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

Invalid co19 enum test #34440

Open
danrubel opened this Issue Sep 11, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@danrubel
Member

danrubel commented Sep 11, 2018

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

This comment has been minimized.

Show comment
Hide comment
@lrhn

lrhn Sep 14, 2018

Member

It is not valid.

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

Are the tests failing anywhere?

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

This comment has been minimized.

Show comment
Hide comment
@eernstg

eernstg Sep 14, 2018

Member

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).

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment