Skip to content

E0210: A typed decorator in a composition ​

A typed decorator (a plain Go function of the decorated function's own type, func(func(int) int) func(int) int) depends on that type, so it can't be part of a composed decorator, which applies to functions of any type.

Wrong ​

vuka
decorator Fast = @logged @double

@Fast
func one() int { return 1 }
vuka
decorator Fast = @logged

@Fast
@double
func one() int { return 1 }

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.