When the type is implicit, the first element in the list of children is not the type of the composite literal, but it is one of the actual children, so it should not be discarded. Fixes #862
17 lines
137 B
Go
17 lines
137 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"image"
|
|
)
|
|
|
|
func main() {
|
|
v := []image.Point{
|
|
{X: 3, Y: 2},
|
|
}
|
|
fmt.Println(v)
|
|
}
|
|
|
|
// Output:
|
|
// [(3,2)]
|