We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I glanced over the type parameters design draft but could not find whether the described behavior is intended or not.
Best Christoph
go version
go2go playground
Yes (if the playground runs the latest version)
https://go2goplay.golang.org/p/QSrT2JEXL7x
I expected _ = []Container(T){} to type check; instead, _ = [](Container(T)){} does type check.
_ = []Container(T){}
_ = [](Container(T)){}
The same pattern neither works with make, map, nor pointer types.
make
map
type checking failed for main prog.go2:11:8: cannot use generic type Container(type T) without instantiation
The text was updated successfully, but these errors were encountered:
Sorry for the issue, I found it in the design draft.
Sorry, something went wrong.
No branches or pull requests
Hi,
I glanced over the type parameters design draft but could not find whether the described behavior is intended or not.
Best
Christoph
What version of Go are you using (
go version
)?go2go playground
Does this issue reproduce with the latest release?
Yes (if the playground runs the latest version)
What did you do?
https://go2goplay.golang.org/p/QSrT2JEXL7x
What did you expect to see?
I expected
_ = []Container(T){}
to type check;instead,
_ = [](Container(T)){}
does type check.The same pattern neither works with
make
,map
, nor pointer types.What did you see instead?
The text was updated successfully, but these errors were encountered: