Aaron Stacy
06/16/2020, 4:22 PMthis
for a lambda with a receiver. Here's a code snippet https://pl.kotl.in/GtgL1DMFc . Based on https://kotlinlang.org/docs/reference/this-expressions.html it seems like I should be able to reference the outer this
via a label, so why can't the compiler resolve the @A
reference? Thanks!diesieben07
06/16/2020, 4:25 PMthis
of value
, not the this
of A
(your function doesn't have an outer A
). So this@value
is what you want.Aaron Stacy
06/16/2020, 4:33 PMAaron Stacy
06/16/2020, 4:36 PMthis@value::doSomething
fails because its receiver is not CoroutineScope
. Oh well.Ruckus
06/16/2020, 5:19 PM