Skip to content

E0211: Type decorator on a generic type ​

A type's decorator receives the type, and a generic type isn't one until it is instantiated. Decorate an alias naming an instantiation.

Wrong ​

vuka
@reg
type Box[T any] struct{ v T }
vuka
type Box[T any] struct{ v T }

@reg
type IntBox = Box[int]

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.