Data flow to/from here: supported expected/actual declarations and extension receivers

This commit is contained in:
Valentin Kipyatkov
2020-04-09 22:01:22 +03:00
parent bfa3fb0589
commit 90188ef44f
78 changed files with 1704 additions and 801 deletions
+19
View File
@@ -0,0 +1,19 @@
// FLOW: OUT
class C {
fun String.extensionFun(): Any {
with("A") {
println(this.length)
println(this@extensionFun.length)
}
return this@C
}
fun foo() {
val x = <caret>"".extensionFun()
}
}
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
return receiver.block()
}