Skip to content

E0117: Can't infer a static's type ​

A static's type comes from its value. nil, or a value whose type depends on statics not yet known, gives none.

Wrong ​

vuka
type Box[T any] struct {
	static cache = nil
}
vuka
type Box[T any] struct {
	static cache map[string]T = nil
}

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.