Convert lambda to reference produces: fix case with qualified this

So #KT-19977 Fixed
This commit is contained in:
Toshiaki Kameyama
2017-11-28 14:00:03 +03:00
committed by Mikhail Glukhikh
parent 50dc9a14a6
commit 0071ca64c7
6 changed files with 69 additions and 4 deletions
@@ -0,0 +1,13 @@
// IS_APPLICABLE: true
// WITH_RUNTIME
class Test {
fun test() {
with(Any()) {
val f = { s: String<caret> -> foo(s) }
}
}
}
fun Test.foo(s: String) {}
@@ -0,0 +1,13 @@
// IS_APPLICABLE: true
// WITH_RUNTIME
class Test {
fun test() {
with(Any()) {
val f = this@Test::foo
}
}
}
fun Test.foo(s: String) {}
@@ -0,0 +1,11 @@
// IS_APPLICABLE: true
// WITH_RUNTIME
class Test {
fun test() {
with(Any()) {
val f = { s: String<caret> -> foo(s) }
}
}
fun foo(s: String) {}
}
@@ -0,0 +1,11 @@
// IS_APPLICABLE: true
// WITH_RUNTIME
class Test {
fun test() {
with(Any()) {
val f = this@Test::foo
}
}
fun foo(s: String) {}
}