Skip to content
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

go/types, types2: better error messages for append, copy, etc. #49735

Open
griesemer opened this issue Nov 22, 2021 · 2 comments
Open

go/types, types2: better error messages for append, copy, etc. #49735

griesemer opened this issue Nov 22, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Nov 22, 2021

Reminder issue. The compiler prints more descriptive errors, especially in the presence of untyped nils.

See also #48852.

@griesemer griesemer added this to the Go1.18 milestone Nov 22, 2021
@griesemer griesemer self-assigned this Nov 22, 2021
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Nov 22, 2021

cc: @findleyr

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 22, 2021

Change https://golang.org/cl/366276 mentions this issue: cmd/compile/internal/types2: print "nil" rather than "untyped nil"

Loading

gopherbot pushed a commit that referenced this issue Nov 22, 2021
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 <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants