Codegen: fix callable reference to member imported from object

This commit is contained in:
Pavel V. Talanov
2015-10-05 18:39:09 +03:00
parent 37d5c4b223
commit 508b401603
5 changed files with 68 additions and 1 deletions
@@ -0,0 +1,17 @@
import A.foo
import A.bar
object A {
fun foo() = "O"
fun String.foo() = "K"
@JvmStatic
fun bar(s: Int) = "OK"
}
fun box(): String {
val static = (::bar)(0)
if (static != "OK") return "1"
return (::foo)() + (String::foo)("")
}