Remove TypeOfChecker for JVM frontend

This is needed to support typeOf with non-reified type parameters.

 #KT-30279
This commit is contained in:
Alexander Udalov
2020-04-29 19:22:35 +02:00
parent 0c0f4ef3db
commit ea413cefb4
10 changed files with 17 additions and 55 deletions
@@ -1,35 +0,0 @@
// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi
// !LANGUAGE: +ProhibitNonReifiedArraysAsReifiedTypeArguments
import kotlin.reflect.typeOf
inline fun <X, reified Y, Z : Y> test1() {
typeOf<X>()
typeOf<List<X>>()
typeOf<Array<X?>>()
typeOf<Y>()
typeOf<Z>()
typeOf<List<Z>?>()
typeOf<Array<Z>>()
}
class Test2<W> {
fun test2() {
typeOf<W>()
typeOf<List<W?>>()
typeOf<Array<W>>()
}
}
inline fun <reified U> f() {
typeOf<U>()
}
fun <T> test3() {
// We don't report anything here because we can't know in frontend how the corresponding type parameter is used in f
f<List<T>>()
}