-
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
spec: incorrect requirement for the embedded field #69460
Labels
Comments
Al right, it looks like the same issue was already mentioned in #22005, however, nothing has been done for 7 years |
Duplicate of #22005 |
This was referenced Sep 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the URL of the page with the issue?
https://go.dev/ref/spec#Struct_types
What is your user agent?
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Screenshot
No response
What did you do?
I came across a discussion about the incorrect terminology used in the specification when referring to promoted methods of the alias to unnamed type, and the changes that were made to address this issue. However, there remains another related problem, and I believe its resolution should also be considered as part of the overall solution. The specification states the following:
If the type name denotes only defined types everything would be fine, however, it also denotes type alias to the unnamed (undefined) types.
What did you see happen?
So according to the specification, the following code is invalid since type name
T
is a pointer type:However, it compiles.
What did you expect to see?
To not compile (actually to compile, but to correct the specification to properly address this as well).
The text was updated successfully, but these errors were encountered: