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: Error message mentions array instead of slice #13365

Closed
dsymonds opened this issue Nov 23, 2015 · 1 comment
Closed

cmd/compile: Error message mentions array instead of slice #13365

dsymonds opened this issue Nov 23, 2015 · 1 comment
Milestone

Comments

@dsymonds
Copy link
Contributor

package main

type T struct{}

func main() {
    t := new(T)
    _ = []string{t}
}

The error message says:

prog.go:7: cannot use t (type *T) as type string in array element

s/array/slice/
(and could possibly drop "element" too, but that's a lesser issue)

@dsymonds dsymonds added this to the Unplanned milestone Nov 23, 2015
@griesemer griesemer self-assigned this Nov 25, 2015
@griesemer griesemer modified the milestones: Go1.6, Unplanned Nov 25, 2015
@gopherbot
Copy link

CL https://golang.org/cl/17206 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 27, 2016
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