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:
@@ -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)()
|
||||
}
|
||||
+15
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user