Files
kotlin-fork/compiler/testData/ir/irText/expressions/classReference.txt
T
Dmitry Petrov 33ed98a0d3 Update typing rules for class literal expressions.
C::class : KClass<C>
expr: T => expr::class : KClass<out T>

NB: this means Obj::class : KClass<out Obj> for object Obj.
2016-12-19 10:41:49 +03:00

21 lines
1.1 KiB
Plaintext
Vendored

FILE /classReference.kt
CLASS CLASS A
CONSTRUCTOR public constructor A()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='A'
FUN public fun test(): kotlin.Unit
BLOCK_BODY
TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CLASS_REFERENCE 'A' type=kotlin.reflect.KClass<A>
TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_CLASS type=kotlin.reflect.KClass<out A>
CALL 'constructor A()' type=A origin=null
TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL '<get-java>() on KClass<A>: Class<A>' type=java.lang.Class<A> origin=GET_PROPERTY
$receiver: CLASS_REFERENCE 'A' type=kotlin.reflect.KClass<A>
TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL '<get-java>() on KClass<out A>: Class<out A>' type=java.lang.Class<out A> origin=GET_PROPERTY
$receiver: GET_CLASS type=kotlin.reflect.KClass<out A>
CALL 'constructor A()' type=A origin=null