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

gc allows conversion from string to byte array #1866

Closed
edsrzf opened this issue May 23, 2011 · 2 comments
Closed

gc allows conversion from string to byte array #1866

edsrzf opened this issue May 23, 2011 · 2 comments

Comments

@edsrzf
Copy link

edsrzf commented May 23, 2011

1. What is a short input program that triggers the error?
package main

func main() {
    var array [5]byte = [...]byte("hello")
    _ = array
}

2. What is the full compiler output?
None; it's successful.

gccgo and gofmt both give errors on this code and I don't believe the spec allows for it.

3. What version of the compiler are you using?  (Run it with the -V flag.)
6g version release.r57.1 8482+
@rsc
Copy link
Contributor

rsc commented May 23, 2011

Comment 1:

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented May 31, 2011

Comment 2:

This issue was closed by revision 5b62ba1.

Status changed to Fixed.

@edsrzf edsrzf added the fixed label May 31, 2011
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants