[FIR] Fix incompatible KClass<Any> and callable reference Collection::class, ^KT-51272 Fixed
This commit is contained in:
+18
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user