Skip to content

E0119: A static or field can't be used this way ​

A selector on a type is a static, a field reference or an enum variant, and this one can't be read the way it is written: it names both a field and a static (ambiguous), it is a variant holding data used without its fields, or it needs its type arguments.

Wrong ​

vuka
enum Shape { Circle{R float64}, Square{S float64} }

var s = Shape.Circle
vuka
enum Shape { Circle{R float64}, Square{S float64} }

var s = Shape.Circle{R: 2}

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.