Skip to content

cmd/go2go: cannot infer generic types when functions have no parameter #49279

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
sina-devel opened this issue Nov 2, 2021 · 1 comment
Closed

Comments

@sina-devel
Copy link

my code: https://go2goplay.golang.org/p/RmdhTCJTy1Q

What did you expect to see?

nothing

What did you see instead?

type checking failed for main
prog.go2:11:14: cannot infer T (prog.go2:3:11) ([<nil>])
prog.go2:17:14: cannot infer T (prog.go2:3:11) ([<nil>])

but this is works https://go2goplay.golang.org/p/T46pnt3s8kH

@thanm
Copy link
Contributor

thanm commented Nov 2, 2021

The go2go playground is out of date, we are in the process of decommissioning it, see #48517. At the moment we don't have a "preview of 1.18" playground set up (hopefully that will happen soon). In the mean time, you might consider using https://pkg.go.dev/golang.org/dl/gotip (with appropriate caveats). Thanks.

@thanm thanm closed this as completed Nov 2, 2021
@golang golang locked and limited conversation to collaborators Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants