Skip to content

Patterns, no error when case clause expression is not valid #50947

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
scheglov opened this issue Jan 8, 2023 · 1 comment
Closed

Patterns, no error when case clause expression is not valid #50947

scheglov opened this issue Jan 8, 2023 · 1 comment
Assignees
Labels
legacy-area-front-end Legacy: Use area-dart-model instead.

Comments

@scheglov
Copy link
Contributor

scheglov commented Jan 8, 2023

void f(Object? x) {
  switch (x) {
    case List<int>:
      break;
  }
}

See co19/LanguageFeatures/Patterns/switch_statement_A05_t01

@scheglov scheglov added the legacy-area-front-end Legacy: Use area-dart-model instead. label Jan 8, 2023
@keertip
Copy link
Contributor

keertip commented Mar 6, 2023

Do see a diagnostic for the above case This expression is not supported as a constant pattern.

@keertip keertip closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-front-end Legacy: Use area-dart-model instead.
Projects
None yet
Development

No branches or pull requests

3 participants