Fix VerifyError on bound function reference on generic property

Also add a test for obsolete KT-14755

 #KT-16929 Fixed
This commit is contained in:
Alexander Udalov
2017-03-23 17:38:26 +03:00
parent fc38479f48
commit fef4c8ccd8
7 changed files with 77 additions and 1 deletions
@@ -0,0 +1,12 @@
class Generic<P : Any>(val p: P)
class Host {
fun t() {}
val v = "OK"
}
fun box(): String {
Generic(Host()).p::class
(Generic(Host()).p::t)()
return (Generic(Host()).p::v)()
}
@@ -0,0 +1,15 @@
class B
fun B.magic() {
}
fun boom(a: Any) {
when (a) {
is B -> run(a::magic)
}
}
fun box(): String {
boom(B())
return "OK"
}