<https://youtrack.jetbrains.com/issue/KT-12183> I...
# kontributors
s
https://youtrack.jetbrains.com/issue/KT-12183 Is there a way to add labels to
this
or
it
?
Copy code
a.setFoo(this)
a.setBar(it)
a.setBaz(3)
It's going to compile error unless the intention add labels to
this
or
it
.
Copy code
with(a) {
  setFoo(this@AAA)
  setBar(it)
  setBaz(3)
}
Copy code
a.let {
  it.setFoo(this)
  it.setBar(it@forEach)
  it.setBaz(3)
}
In case the issue is not talking about
let
, then ignore the case for
it