ktfmtFix error: "error: expected token: 'context'; generated ( instead"

18 Views Asked by At

When running lint on my project I get the following error:

error: expected token: 'context'; generated ( instead

The error points to this section of code where I'm using the context keyword for context receivers.

val viewEffectMap: MutableMap<KClass<out ViewEffect>, context(Context, View) (effect: ViewEffect) -> Unit> = mutableMapOf()

The code compiles and runs as I'd expect, it's only the ktfmtFix command that complains.

0

There are 0 best solutions below