[FIR] Fix incompatible KClass<Any> and callable reference Collection::class, ^KT-51272 Fixed

This commit is contained in:
Ivan Kochurkin
2022-02-15 22:07:32 +03:00
committed by teamcity
parent 31d9313c51
commit f751f13c4d
7 changed files with 51 additions and 3 deletions
@@ -0,0 +1,18 @@
// FIR_IDENTICAL
// ISSUE: KT-51272
import kotlin.reflect.KClass
fun testOnKClass(rootClass: KClass<Any>): Int {
return when (rootClass) {
Collection::class -> 1
else -> 2
}
}
fun testOnClass(rootClass: Class<Any>): Int {
return when (rootClass) {
Collection::class -> 1
else -> 2
}
}