Report error on non-reified type parameter with recursive bound in typeOf

Instead of throwing an exception.

 #KT-40173
This commit is contained in:
Alexander Udalov
2021-07-06 16:21:13 +02:00
parent 438ce57183
commit 02774fae0c
10 changed files with 44 additions and 3 deletions
@@ -0,0 +1,8 @@
// WITH_RUNTIME
// USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi
import kotlin.reflect.typeOf
fun <T : Comparable<T>> foo() {
<!TYPEOF_NON_REIFIED_TYPE_PARAMETER_WITH_RECURSIVE_BOUND!>typeOf<List<T>>()<!>
}
@@ -0,0 +1,3 @@
package
public fun </*0*/ T : kotlin.Comparable<T>> foo(): kotlin.Unit