Use independent context to type-check LHS of '::'

#KT-13110 Fixed
This commit is contained in:
Alexander Udalov
2016-09-14 11:37:20 +03:00
parent 84aa82e73c
commit 22f8e7db3b
5 changed files with 28 additions and 10 deletions
@@ -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