-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version
)?
$ go version go version go1.18beta1 linux/amd64 $ gccgo --version gccgo (Debian 10.2.1-6) 10.2.1 20210110
Does this issue reproduce with the latest release?
Yes
What did you do?
package main
type Person = struct {
Name string
Address *struct {
Street string
City string
}
}
var data []struct {
Name string `json:"name"`
Address *struct {
Street string `json:"street"`
City string `json:"city"`
} `json:"address"`
}
var person = ([]Person)(data)
func main() {}
What did you expect to see?
Same behavior
What did you see instead?
$ go run main.go
$ go run -compiler=gccgo main.go
# command-line-arguments
./main.go:19:24: error: invalid type conversion
19 | var person = ([]Person)(data)
| ^
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.