...using `let`, `apply` etc always make feel uncom...
# language-proposals
a
...using
let
,
apply
etc always make feel uncomfortable and I just have to double check it has
@InlineOnly inline /* don't worry it won't create anonymous class filled with reflection*/ fun
signature...
m
anonymous class filled with reflection
wat?
a
It's an exagerration.
m
okay 🙂
a
However,
Copy code
class Main {
	var prop = 10
	fun main() {
		val ref1 = this::prop
		val ref2 = Main::prop
		println(ref1.get())
		println(ref2.get(this))
	}
}
generates
final class Main$main$ref1$1 extends kotlin/jvm/internal/MutablePropertyReference0
and
final class Main$main$ref2$1 extends kotlin/jvm/internal/MutablePropertyReference1
m
Yes, it's an extra class, but no reflections involved.