-
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: "any" should be an alias for "interface{}", not a defined type #49665
Comments
CC @griesemer |
See also #49583. I expected that change to only affect error messages from the type checker, not %T formatting (if indeed this is a consequence of that change). |
Discussing with @griesemer, the problem may be here: Should that be |
Yeah, that code is incorrect if We should be creating A bit more involved will be finding all the |
If we confirm that |
@thanm This may be related to the |
|
See also the forthcoming spec (search for |
Change https://golang.org/cl/365354 mentions this issue: |
The spec says
I would interpret it as "any" being an alias type, not a defined type, i.e. essentially
type any = interface{}
.But it seems the compiler treats "any" as a defined type, for example,
This prints
(In contrast, the spec says "byte" is an alias for "uint8", and both byte and uint8 print as "uint8".)
The text was updated successfully, but these errors were encountered: