Fix exception on inlining callable reference with implicit this in LHS

Use ResolvedCall to determine the receiver type in the JVM codegen,
instead of manually inspecting the PSI

 #KT-20821 Fixed
This commit is contained in:
Alexander Udalov
2017-11-22 17:40:06 +01:00
parent 1ceb751061
commit f4f5359725
11 changed files with 124 additions and 42 deletions
@@ -0,0 +1,15 @@
class X {
fun x(): String {
return foo("O", "K", ::y)
}
fun y(a: String, b: String): String = a + b
}
inline fun foo(a: String, b: String, f: (String, String) -> String): String {
return f(a, b)
}
fun box(): String {
return X().x()
}