Support non-reified type parameters in typeOf in JVM and JVM_IR

#KT-30279 Fixed
This commit is contained in:
Alexander Udalov
2020-01-31 14:13:11 +01:00
committed by Alexander Udalov
parent 6fb40878c4
commit 0ce16b9d8c
46 changed files with 1748 additions and 122 deletions
@@ -14,15 +14,17 @@ inline fun <reified T> T.causeBug() {
x is T
x as T
T::class
typeOf<T>()
Array<T>(1) { x }
// Non-reified type parameters with recursive bounds are not yet supported
// typeOf<T>()
}
interface SomeToImplement<SELF_TVAR>
class Y : SomeToImplement<Y>
class Something<T> where T: SomeToImplement<T> {
class Something<Z> where Z : SomeToImplement<Z> {
fun op() = causeBug()
}