-
Notifications
You must be signed in to change notification settings - Fork 18.1k
go/types, types2: better error messages for copy, others #49735
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
Comments
cc: @findleyr |
Change https://golang.org/cl/366276 mentions this issue: |
When we have a typed nil, we already say so; thus it is sufficient to use "nil" in all the other cases. This is closer to (1.17) compiler behavior. In cases where the 1.17 compiler prints "untyped nil" (e.g., wrong uses of "copy"), we already print a different message. We can do better in those cases as well; will be addressed in a separate CL (see #49735). Fixes #48852. Change-Id: I9a7a72e0f99185b00f80040c5510a693b1ea80f6 Reviewed-on: https://go-review.googlesource.com/c/go/+/366276 Trust: Robert Griesemer <[email protected]> Reviewed-by: Robert Findley <[email protected]>
The CL above addresses the concern for |
Change https://go.dev/cl/384615 mentions this issue: |
For #49735. Change-Id: Ib7343061dca0e8d848e0719d39be0393d7cfad93 Reviewed-on: https://go-review.googlesource.com/c/go/+/384615 Trust: Robert Griesemer <[email protected]> Reviewed-by: Robert Findley <[email protected]>
The error messages for |
Reminder issue. The compiler prints more descriptive errors, especially in the presence of untyped nils.
See also #48852.
The text was updated successfully, but these errors were encountered: