Skip to content

Conversation

mininny
Copy link
Contributor

@mininny mininny commented Oct 8, 2023

enum Foo {
    case bar<T>(baz: T)
            ^
}

above code results in

Consecutive declarations on a line must be separated by ';'
Expected declaration

which is not very helpful for informing the user that generics are not available as a case in enums.

Something like enum cases cannot have generic parameters. did you mean to attach it to enum declaration could be emitted for better guidance to the users.

Resolves #69036

@AnthonyLatsis
Copy link
Collaborator

Closed in favor of #69055.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad diagnostic for generic parameter list on enum case

2 participants