-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: syntax error for valid type parameter list #51488
Comments
CC @griesemer |
Thanks, we can address this for 1.19. |
more forms:
|
We're aware of them, thanks. See #49482. |
So this is covered in spec?
But it looks this one is not covered in spec.
|
sorry, remove one |
Is it worth considering this case: #6386 (comment) ? [edit]: maybe it is not worth it. If array could be declared as const, array index expressions should be banned in the length expressions of array declarations. |
Not sure whether or not this is intended: type C4[T ([]int)] struct{} // compiles okay
type C5[T ([]int)|bool] struct{} // fails to compile |
Luckily, const S = "abcde"
const int = 2
const N = S[2]*int // error
type _ [S[2]*int] struct{} // error |
Closing as duplicate of #49482. |
What version of Go are you using (
go version
)?What did you do?
What did you expect to see?
compiles okay
What did you see instead?
fails to compile
The text was updated successfully, but these errors were encountered: