Use independent context to type-check LHS of '::'
#KT-13110 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// KT-13110 Strange type mismatch error on class literal with integer receiver expression
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
fun f(<!UNUSED_PARAMETER!>x<!>: KClass<Int>) {}
|
||||
|
||||
fun test() {
|
||||
f(42::class)
|
||||
f((40 + 2)::class)
|
||||
42::toInt
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public fun f(/*0*/ x: kotlin.reflect.KClass<kotlin.Int>): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
Reference in New Issue
Block a user