Fix for KT-7017: Reified type referenced in object literal crashes at runtime

#KT-7017 Fixed
This commit is contained in:
Michael Bogdanov
2015-10-22 14:14:01 +03:00
parent 3e19514099
commit a7b3c70d21
5 changed files with 59 additions and 28 deletions
@@ -0,0 +1,9 @@
import test.*
fun box(): String {
if (!test<String>("OK")) return "fail 1"
if (test<Int>("OK")) return "fail 2"
return "OK"
}
@@ -0,0 +1,9 @@
package test
inline fun test<reified T>(x: Any): Boolean {
val x = object {
val y = x is T
}
return x.y
}