1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
class Test(var value: String) { fun brokenApply(v: String) = apply { value = v } fun brokenRun(v: String) = run { value = v this } fun brokenLet(v: String) = let { it.value = v it } fun brokenGenerics() = listOf("a", "b", "c") fun working(v: String) = doSomething() fun doSomething(): String = "Hello" }