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/internal/types2: predeclared type "comparable" must not be visible before Go 1.18 #46090
Comments
I believe this is working as intended: [edit]: But neither |
I think I'm inclined to agree. I'm not sure why I thought Looking more closely at the go2go error diagnostics, I suspect the error message is actually because go2go is generating invalid code in this case. ( |
Change https://golang.org/cl/331517 mentions this issue: |
In case it helps, go2go reports go/types errors with a prefix of "type checking failed for PACKAGE". If you see that message, there is probably a problem with the code being translated. If you don't see that message, it's probably a bug in go2go. |
@ianlancetaylor Thanks for the tip. |
…e visible before Go 1.18 While at it, clean up the setup of comparable in universe.go. Fixes #46090 Change-Id: I9655b3e137a03763d677d9a2a730c5570ccff6dc Reviewed-on: https://go-review.googlesource.com/c/go/+/331517 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This was fixed by https://golang.org/cl/331517 in |
This package produces an "undefined: any" error when compiled with
go tool compile -G=1
:but this package successfully type-checks (but fails later anyway when compiled with -G=3):
They both produce errors on go2goplay.golang.org.
/cc @griesemer @findleyr
The text was updated successfully, but these errors were encountered: