Open
Description
Description
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 generic parameter 'T' cannot be used in an enum case. did you mean to attach it to enum declaration?
could be emitted for better guidance to the users.
Environment
- Swift compiler version info: swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1) Target: arm64-apple-macosx14.0
- Xcode version info Xcode 15.0 Build version 15A240d