func test() {
type glVec4 [4]gl.Float
foo := glVec4{0, 0, 0, 1}
println(fmtStr("%v", foo))
}
The imported gl.Float is just aliasing float32.
But with the following, go vet yields "struct literal uses untagged fields":
foo := ugl.GlVec4{0, 0, 0, 1}
Only difference? Now the [4]gl.Float type-alias is imported from another
external package. Yet it's the same [4]gl.Float -- an array type, not a
struct type.
The message goes away when I change it to this:
foo := ugl.GlVec4{0: 0, 1: 0, 2: 0, 3: 1}
But this is hardly a good array literal...
Is that a bug or am I missing something?
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.