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

cmd/compile: better error message for failed string conversion #23813

Open
griesemer opened this issue Feb 13, 2018 · 2 comments
Open

cmd/compile: better error message for failed string conversion #23813

griesemer opened this issue Feb 13, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Feb 13, 2018

https://play.golang.org/p/8ADwHokqcK5 complains with:

prog.go:6:12: cannot use x (type []T) as type []byte in argument to runtime.slicebytetostring

The error message should not mention runtime.slicebytetostring which is an implementation detail.

(There are probably more error situations that expose runtime calls this way. Should handle them all uniformly.)

@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Jun 5, 2018

Has been like this for a while. Moving to 1.12.

@griesemer griesemer modified the milestones: Go1.11, Go1.12 Jun 5, 2018
@odeke-em odeke-em self-assigned this Oct 18, 2018
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Oct 24, 2018

We should wait with fixing this depending on the resolution of #23536. It's not just go/types. The compiler also seems not consistent.

@griesemer griesemer modified the milestones: Go1.12, Go1.13 Nov 28, 2018
@griesemer griesemer modified the milestones: Go1.13, Go1.14 May 6, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.