mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-02 00:21:31 +00:00
FIR: add implementation of reified type parameter references
This adds support of T::class.java for reified type parameters
This commit is contained in:
@@ -1301,10 +1301,20 @@ class Fir2IrVisitor(
|
||||
|
||||
override fun visitGetClassCall(getClassCall: FirGetClassCall, data: Any?): IrElement {
|
||||
return getClassCall.convertWithOffsets { startOffset, endOffset ->
|
||||
IrGetClassImpl(
|
||||
startOffset, endOffset, getClassCall.typeRef.toIrType(session, declarationStorage),
|
||||
getClassCall.argument.toIrExpression()
|
||||
)
|
||||
val argument = getClassCall.argument
|
||||
val irType = getClassCall.typeRef.toIrType(session, declarationStorage)
|
||||
if (argument is FirResolvedReifiedParameterReference) {
|
||||
IrClassReferenceImpl(
|
||||
startOffset, endOffset, irType,
|
||||
argument.symbol.toTypeParameterSymbol(declarationStorage),
|
||||
argument.typeRef.toIrType(session, declarationStorage)
|
||||
)
|
||||
} else {
|
||||
IrGetClassImpl(
|
||||
startOffset, endOffset, irType,
|
||||
argument.toIrExpression()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration
|
||||
import org.jetbrains.kotlin.fir.expressions.*
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirExpressionStub
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirResolvedQualifierImpl
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirResolvedReifiedParameterReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.references.FirNamedReference
|
||||
import org.jetbrains.kotlin.fir.references.FirReference
|
||||
import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference
|
||||
@@ -202,22 +203,28 @@ class FirCallResolver(
|
||||
is FirNamedReferenceWithCandidate -> nameReference.candidateSymbol
|
||||
else -> null
|
||||
}
|
||||
if (referencedSymbol is FirClassLikeSymbol<*>) {
|
||||
val classId = referencedSymbol.classId
|
||||
return FirResolvedQualifierImpl(nameReference.source, classId.packageFqName, classId.relativeClassName).apply {
|
||||
resultType = if (classId.isLocal) {
|
||||
typeForQualifierByDeclaration(referencedSymbol.fir, resultType)
|
||||
?: resultType.resolvedTypeFromPrototype(
|
||||
session.builtinTypes.unitType.type//StandardClassIds.Unit(symbolProvider).constructType(emptyArray(), isNullable = false)
|
||||
)
|
||||
} else {
|
||||
typeForQualifier(this)
|
||||
when {
|
||||
referencedSymbol is FirClassLikeSymbol<*> -> {
|
||||
val classId = referencedSymbol.classId
|
||||
return FirResolvedQualifierImpl(nameReference.source, classId.packageFqName, classId.relativeClassName).apply {
|
||||
resultType = if (classId.isLocal) {
|
||||
typeForQualifierByDeclaration(referencedSymbol.fir, resultType)
|
||||
?: resultType.resolvedTypeFromPrototype(
|
||||
session.builtinTypes.unitType.type//StandardClassIds.Unit(symbolProvider).constructType(emptyArray(), isNullable = false)
|
||||
)
|
||||
} else {
|
||||
typeForQualifier(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (qualifiedAccess.explicitReceiver == null) {
|
||||
qualifiedResolver.reset()
|
||||
referencedSymbol is FirTypeParameterSymbol && referencedSymbol.fir.isReified -> {
|
||||
return FirResolvedReifiedParameterReferenceImpl(nameReference.source, referencedSymbol).apply {
|
||||
resultType = typeForReifiedParameterReference(this)
|
||||
}
|
||||
}
|
||||
qualifiedAccess.explicitReceiver == null -> {
|
||||
qualifiedResolver.reset()
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
@@ -11,10 +11,7 @@ import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind
|
||||
import org.jetbrains.kotlin.fir.diagnostics.FirSimpleDiagnostic
|
||||
import org.jetbrains.kotlin.fir.diagnostics.FirStubDiagnostic
|
||||
import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccess
|
||||
import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvable
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier
|
||||
import org.jetbrains.kotlin.fir.expressions.*
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirExpressionWithSmartcastImpl
|
||||
import org.jetbrains.kotlin.fir.references.FirErrorNamedReference
|
||||
import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference
|
||||
@@ -336,6 +333,12 @@ fun BodyResolveComponents.typeForQualifier(resolvedQualifier: FirResolvedQualifi
|
||||
)
|
||||
}
|
||||
|
||||
internal fun typeForReifiedParameterReference(parameterReference: FirResolvedReifiedParameterReference): FirTypeRef {
|
||||
val resultType = parameterReference.resultType
|
||||
val typeParameterSymbol = parameterReference.symbol
|
||||
return resultType.resolvedTypeFromPrototype(typeParameterSymbol.constructType(emptyArray(), false))
|
||||
}
|
||||
|
||||
internal fun typeForQualifierByDeclaration(declaration: FirDeclaration, resultType: FirTypeRef): FirTypeRef? {
|
||||
if (declaration is FirRegularClass) {
|
||||
if (declaration.classKind == ClassKind.OBJECT) {
|
||||
|
||||
@@ -386,7 +386,7 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) :
|
||||
val typeOfExpression = when (val lhs = transformedGetClassCall.argument) {
|
||||
is FirResolvedQualifier -> {
|
||||
val classId = lhs.classId
|
||||
classId?.let { classId ->
|
||||
if (classId != null) {
|
||||
val symbol = symbolProvider.getClassLikeSymbolByFqName(classId)
|
||||
// TODO: Unify logic?
|
||||
symbol?.constructType(
|
||||
@@ -395,9 +395,17 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) :
|
||||
},
|
||||
isNullable = false
|
||||
)
|
||||
} ?: lhs.resultType.coneTypeUnsafe<ConeKotlinType>()
|
||||
} else {
|
||||
null
|
||||
} ?: lhs.resultType.coneTypeUnsafe()
|
||||
}
|
||||
is FirResolvedReifiedParameterReference -> {
|
||||
val symbol = lhs.symbol
|
||||
symbol.constructType(emptyArray(), isNullable = false)
|
||||
}
|
||||
else -> {
|
||||
lhs.resultType.coneTypeUnsafe<ConeKotlinType>()
|
||||
}
|
||||
else -> lhs.resultType.coneTypeUnsafe<ConeKotlinType>()
|
||||
}
|
||||
|
||||
transformedGetClassCall.resultType =
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
inline fun <reified T : Any> foo(t: T): T {
|
||||
val klass = <!OTHER_ERROR!>T<!>::class.<!INAPPLICABLE_CANDIDATE!>java<!>
|
||||
val klass = T::class.java
|
||||
return t
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: classLiteralForParameter.kt
|
||||
public final inline fun <reified T : R|kotlin/Any|> foo(t: R|T|): R|T| {
|
||||
lval klass: <ERROR TYPE REF: Inapplicable(WRONG_RECEIVER): [kotlin/jvm/java]> = <getClass>(R|?|).<Inapplicable(WRONG_RECEIVER): [kotlin/jvm/java]>#
|
||||
lval klass: R|java/lang/Class<T>| = <getClass>(R|T|).R|kotlin/jvm/java|
|
||||
^foo R|<local>/t|
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.expressions
|
||||
|
||||
import org.jetbrains.kotlin.fir.FirPureAbstractElement
|
||||
import org.jetbrains.kotlin.fir.FirSourceElement
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.visitors.*
|
||||
|
||||
/*
|
||||
* This file was generated automatically
|
||||
* DO NOT MODIFY IT MANUALLY
|
||||
*/
|
||||
|
||||
abstract class FirResolvedReifiedParameterReference : FirPureAbstractElement(), FirExpression {
|
||||
abstract override val source: FirSourceElement?
|
||||
abstract override val typeRef: FirTypeRef
|
||||
abstract override val annotations: List<FirAnnotationCall>
|
||||
abstract val symbol: FirTypeParameterSymbol
|
||||
|
||||
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R = visitor.visitResolvedReifiedParameterReference(this, data)
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.expressions.impl
|
||||
|
||||
import org.jetbrains.kotlin.fir.FirSourceElement
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvedReifiedParameterReference
|
||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImpl
|
||||
import org.jetbrains.kotlin.fir.visitors.*
|
||||
|
||||
/*
|
||||
* This file was generated automatically
|
||||
* DO NOT MODIFY IT MANUALLY
|
||||
*/
|
||||
|
||||
class FirResolvedReifiedParameterReferenceImpl(
|
||||
override val source: FirSourceElement?,
|
||||
override val symbol: FirTypeParameterSymbol
|
||||
) : FirResolvedReifiedParameterReference(), FirAbstractAnnotatedElement {
|
||||
override var typeRef: FirTypeRef = FirImplicitTypeRefImpl(null)
|
||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||
|
||||
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
|
||||
typeRef.accept(visitor, data)
|
||||
annotations.forEach { it.accept(visitor, data) }
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirResolvedReifiedParameterReferenceImpl {
|
||||
typeRef = typeRef.transformSingle(transformer, data)
|
||||
annotations.transformInplace(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun replaceTypeRef(newTypeRef: FirTypeRef) {
|
||||
typeRef = newTypeRef
|
||||
}
|
||||
}
|
||||
@@ -93,6 +93,7 @@ import org.jetbrains.kotlin.fir.expressions.FirLambdaArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirSpreadArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirNamedArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvedReifiedParameterReference
|
||||
import org.jetbrains.kotlin.fir.expressions.FirReturnExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirStringConcatenationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirThrowExpression
|
||||
@@ -477,6 +478,10 @@ abstract class FirTransformer<in D> : FirVisitor<CompositeTransformResult<FirEle
|
||||
return transformElement(resolvedQualifier, data)
|
||||
}
|
||||
|
||||
open fun transformResolvedReifiedParameterReference(resolvedReifiedParameterReference: FirResolvedReifiedParameterReference, data: D): CompositeTransformResult<FirStatement> {
|
||||
return transformElement(resolvedReifiedParameterReference, data)
|
||||
}
|
||||
|
||||
open fun transformReturnExpression(returnExpression: FirReturnExpression, data: D): CompositeTransformResult<FirStatement> {
|
||||
return transformElement(returnExpression, data)
|
||||
}
|
||||
@@ -929,6 +934,10 @@ abstract class FirTransformer<in D> : FirVisitor<CompositeTransformResult<FirEle
|
||||
return transformResolvedQualifier(resolvedQualifier, data)
|
||||
}
|
||||
|
||||
final override fun visitResolvedReifiedParameterReference(resolvedReifiedParameterReference: FirResolvedReifiedParameterReference, data: D): CompositeTransformResult<FirStatement> {
|
||||
return transformResolvedReifiedParameterReference(resolvedReifiedParameterReference, data)
|
||||
}
|
||||
|
||||
final override fun visitReturnExpression(returnExpression: FirReturnExpression, data: D): CompositeTransformResult<FirStatement> {
|
||||
return transformReturnExpression(returnExpression, data)
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ import org.jetbrains.kotlin.fir.expressions.FirLambdaArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirSpreadArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirNamedArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvedReifiedParameterReference
|
||||
import org.jetbrains.kotlin.fir.expressions.FirReturnExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirStringConcatenationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirThrowExpression
|
||||
@@ -301,6 +302,8 @@ abstract class FirVisitor<out R, in D> {
|
||||
|
||||
open fun visitResolvedQualifier(resolvedQualifier: FirResolvedQualifier, data: D): R = visitElement(resolvedQualifier, data)
|
||||
|
||||
open fun visitResolvedReifiedParameterReference(resolvedReifiedParameterReference: FirResolvedReifiedParameterReference, data: D): R = visitElement(resolvedReifiedParameterReference, data)
|
||||
|
||||
open fun visitReturnExpression(returnExpression: FirReturnExpression, data: D): R = visitElement(returnExpression, data)
|
||||
|
||||
open fun visitStringConcatenationCall(stringConcatenationCall: FirStringConcatenationCall, data: D): R = visitElement(stringConcatenationCall, data)
|
||||
|
||||
@@ -93,6 +93,7 @@ import org.jetbrains.kotlin.fir.expressions.FirLambdaArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirSpreadArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirNamedArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier
|
||||
import org.jetbrains.kotlin.fir.expressions.FirResolvedReifiedParameterReference
|
||||
import org.jetbrains.kotlin.fir.expressions.FirReturnExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirStringConcatenationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirThrowExpression
|
||||
@@ -475,6 +476,10 @@ abstract class FirVisitorVoid : FirVisitor<Unit, Nothing?>() {
|
||||
visitElement(resolvedQualifier)
|
||||
}
|
||||
|
||||
open fun visitResolvedReifiedParameterReference(resolvedReifiedParameterReference: FirResolvedReifiedParameterReference) {
|
||||
visitElement(resolvedReifiedParameterReference)
|
||||
}
|
||||
|
||||
open fun visitReturnExpression(returnExpression: FirReturnExpression) {
|
||||
visitElement(returnExpression)
|
||||
}
|
||||
@@ -927,6 +932,10 @@ abstract class FirVisitorVoid : FirVisitor<Unit, Nothing?>() {
|
||||
visitResolvedQualifier(resolvedQualifier)
|
||||
}
|
||||
|
||||
final override fun visitResolvedReifiedParameterReference(resolvedReifiedParameterReference: FirResolvedReifiedParameterReference, data: Nothing?) {
|
||||
visitResolvedReifiedParameterReference(resolvedReifiedParameterReference)
|
||||
}
|
||||
|
||||
final override fun visitReturnExpression(returnExpression: FirReturnExpression, data: Nothing?) {
|
||||
visitReturnExpression(returnExpression)
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
|
||||
val namedArgumentExpression = element("NamedArgumentExpression", Expression, wrappedArgumentExpression)
|
||||
|
||||
val resolvedQualifier = element("ResolvedQualifier", Expression, expression)
|
||||
val resolvedReifiedParameterReference = element("ResolvedReifiedParameterReference", Expression, expression)
|
||||
val returnExpression = element("ReturnExpression", Expression, jump)
|
||||
val stringConcatenationCall = element("StringConcatenationCall", Expression, call, expression)
|
||||
val throwExpression = element("ThrowExpression", Expression, expression)
|
||||
|
||||
@@ -347,6 +347,8 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
}
|
||||
}
|
||||
|
||||
impl(resolvedReifiedParameterReference)
|
||||
|
||||
impl(returnExpression) {
|
||||
lateinit("target")
|
||||
default("typeRef", "FirImplicitNothingTypeRef(source)")
|
||||
|
||||
@@ -430,6 +430,10 @@ object NodeConfigurator : AbstractFieldConfigurator() {
|
||||
+typeArguments.withTransform()
|
||||
}
|
||||
|
||||
resolvedReifiedParameterReference.configure {
|
||||
+field("symbol", typeParameterSymbolType)
|
||||
}
|
||||
|
||||
stringConcatenationCall.configure {
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ val abstractFirBasedSymbolType = type("fir.symbols", "AbstractFirBasedSymbol")
|
||||
val backingFieldSymbolType = type("fir.symbols.impl", "FirBackingFieldSymbol")
|
||||
val delegateFieldSymbolType = type("fir.symbols.impl", "FirDelegateFieldSymbol")
|
||||
val classSymbolType = type("fir.symbols.impl", "FirClassSymbol")
|
||||
val typeParameterSymbolType = type("fir.symbols.impl", "FirTypeParameterSymbol")
|
||||
|
||||
val pureAbstractElementType = generatedType("FirPureAbstractElement")
|
||||
val effectDeclarationType = type("fir.contracts.description", "ConeEffectDeclaration")
|
||||
|
||||
@@ -36,10 +36,10 @@ fun test8() {}
|
||||
|
||||
inline val <reified T> T.test9
|
||||
get() = @AnnArray(arrayOf(
|
||||
<!OTHER_ERROR!>T<!>::class,
|
||||
T::class,
|
||||
Array<T>::class,
|
||||
Array<Array<Array<T>>>::class
|
||||
)) object {}
|
||||
|
||||
inline val <reified T> T.test10
|
||||
get() = @AnnArray([<!OTHER_ERROR!>T<!>::class]) object {}
|
||||
get() = @AnnArray([T::class]) object {}
|
||||
|
||||
@@ -6,7 +6,7 @@ annotation class Ann(vararg val k: KClass<*>)
|
||||
|
||||
inline val <reified T> T.test
|
||||
get() = @Ann(
|
||||
<!OTHER_ERROR!>T<!>::class,
|
||||
T::class,
|
||||
Array<T>::class,
|
||||
Array<Array<Array<T>>>::class
|
||||
) object {}
|
||||
|
||||
@@ -14,7 +14,7 @@ fun <T : Any> foo() {
|
||||
}
|
||||
|
||||
inline fun <reified T : Any> bar() {
|
||||
val t3 = <!OTHER_ERROR!>T<!>?::class
|
||||
val t3 = T?::class
|
||||
}
|
||||
|
||||
val m = Map<String>::class
|
||||
|
||||
@@ -17,11 +17,11 @@ public class A {
|
||||
// types checked by txt file
|
||||
|
||||
// FILE: 1.kt
|
||||
inline fun <reified X> test1() = <!OTHER_ERROR!>X<!>::class.<!INAPPLICABLE_CANDIDATE!>java<!>
|
||||
inline fun <reified X : Any> test2() = <!OTHER_ERROR!>X<!>::class.<!INAPPLICABLE_CANDIDATE!>java<!>
|
||||
inline fun <reified X : Any?> test3() = <!OTHER_ERROR!>X<!>::class.<!INAPPLICABLE_CANDIDATE!>java<!>
|
||||
inline fun <reified X : Number> test4() = <!OTHER_ERROR!>X<!>::class.<!INAPPLICABLE_CANDIDATE!>java<!>
|
||||
inline fun <reified X : Number?> test5() = <!OTHER_ERROR!>X<!>::class.<!INAPPLICABLE_CANDIDATE!>java<!>
|
||||
inline fun <reified X> test1() = X::class.java
|
||||
inline fun <reified X : Any> test2() = X::class.java
|
||||
inline fun <reified X : Any?> test3() = X::class.java
|
||||
inline fun <reified X : Number> test4() = X::class.java
|
||||
inline fun <reified X : Number?> test5() = X::class.java
|
||||
|
||||
fun test6() = A.getA()::class.java
|
||||
fun test7() = A.getKClass().java
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
inline fun<reified T> foo(block: () -> T): String = block().toString()
|
||||
|
||||
inline fun <reified T: Any> javaClass(): Class<T> = <!OTHER_ERROR!>T<!>::class.<!INAPPLICABLE_CANDIDATE!>java<!>
|
||||
inline fun <reified T: Any> javaClass(): Class<T> = T::class.java
|
||||
|
||||
fun box() {
|
||||
val a = arrayOf(null!!)
|
||||
|
||||
@@ -55,7 +55,7 @@ FILE fqName:<root> fileName:/classLiteralInAnnotation.kt
|
||||
BLOCK type=<root>.test2.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = GET_CLASS type=kotlin.reflect.KClass<IrErrorType>)
|
||||
A(klass = CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]' type=kotlin.reflect.KClass<T of <root>.test2>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test2.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
BLOCK_BODY
|
||||
@@ -70,7 +70,7 @@ FILE fqName:<root> fileName:/classLiteralInAnnotation.kt
|
||||
BLOCK type=<root>.<get-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = GET_CLASS type=kotlin.reflect.KClass<IrErrorType>)
|
||||
A(klass = CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]' type=kotlin.reflect.KClass<T of <uninitialized parent>>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.<get-test3>.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
BLOCK_BODY
|
||||
@@ -84,7 +84,7 @@ FILE fqName:<root> fileName:/classLiteralInAnnotation.kt
|
||||
BLOCK type=<root>.<set-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = GET_CLASS type=kotlin.reflect.KClass<IrErrorType>)
|
||||
A(klass = CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]' type=kotlin.reflect.KClass<T of <uninitialized parent>>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.<set-test3>.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
BLOCK_BODY
|
||||
|
||||
@@ -1,53 +1,47 @@
|
||||
FILE fqName:<root> fileName:/typeParameterClassLiteral.kt
|
||||
FUN name:classRefFun visibility:public modality:FINAL <T> () returnType:kotlin.reflect.KClass<IrErrorType> [inline]
|
||||
FUN name:classRefFun visibility:public modality:FINAL <T> () returnType:kotlin.reflect.KClass<T of <root>.classRefFun> [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun classRefFun <T> (): kotlin.reflect.KClass<IrErrorType> [inline] declared in <root>'
|
||||
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
|
||||
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
|
||||
FUN name:classRefExtFun visibility:public modality:FINAL <T> ($receiver:kotlin.Any) returnType:kotlin.reflect.KClass<IrErrorType> [inline]
|
||||
RETURN type=kotlin.Nothing from='public final fun classRefFun <T> (): kotlin.reflect.KClass<T of <root>.classRefFun> [inline] declared in <root>'
|
||||
CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<T of <root>.classRefFun>
|
||||
FUN name:classRefExtFun visibility:public modality:FINAL <T> ($receiver:kotlin.Any) returnType:kotlin.reflect.KClass<T of <root>.classRefExtFun> [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun classRefExtFun <T> (): kotlin.reflect.KClass<IrErrorType> [inline] declared in <root>'
|
||||
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
|
||||
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
|
||||
RETURN type=kotlin.Nothing from='public final fun classRefExtFun <T> (): kotlin.reflect.KClass<T of <root>.classRefExtFun> [inline] declared in <root>'
|
||||
CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<T of <root>.classRefExtFun>
|
||||
PROPERTY name:classRefExtVal visibility:public modality:FINAL [val]
|
||||
FUN name:<get-classRefExtVal> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KClass<IrErrorType>
|
||||
FUN name:<get-classRefExtVal> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KClass<T of <uninitialized parent>>
|
||||
correspondingProperty: PROPERTY name:classRefExtVal visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-classRefExtVal> (): kotlin.reflect.KClass<IrErrorType> declared in <root>'
|
||||
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
|
||||
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-classRefExtVal> (): kotlin.reflect.KClass<T of <uninitialized parent>> declared in <root>'
|
||||
CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<T of <uninitialized parent>>
|
||||
CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Host [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:classRefGenericMemberFun visibility:public modality:FINAL <TF> ($this:<root>.Host) returnType:kotlin.reflect.KClass<IrErrorType> [inline]
|
||||
FUN name:classRefGenericMemberFun visibility:public modality:FINAL <TF> ($this:<root>.Host) returnType:kotlin.reflect.KClass<TF of <root>.Host.classRefGenericMemberFun> [inline]
|
||||
TYPE_PARAMETER name:TF index:0 variance: superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Host
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun classRefGenericMemberFun <TF> (): kotlin.reflect.KClass<IrErrorType> [inline] declared in <root>.Host'
|
||||
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
|
||||
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
|
||||
FUN name:classRefGenericMemberExtFun visibility:public modality:FINAL <TF> ($this:<root>.Host, $receiver:kotlin.Any) returnType:kotlin.reflect.KClass<IrErrorType> [inline]
|
||||
RETURN type=kotlin.Nothing from='public final fun classRefGenericMemberFun <TF> (): kotlin.reflect.KClass<TF of <root>.Host.classRefGenericMemberFun> [inline] declared in <root>.Host'
|
||||
CLASS_REFERENCE 'TYPE_PARAMETER name:TF index:0 variance: superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<TF of <root>.Host.classRefGenericMemberFun>
|
||||
FUN name:classRefGenericMemberExtFun visibility:public modality:FINAL <TF> ($this:<root>.Host, $receiver:kotlin.Any) returnType:kotlin.reflect.KClass<TF of <root>.Host.classRefGenericMemberExtFun> [inline]
|
||||
TYPE_PARAMETER name:TF index:0 variance: superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Host
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun classRefGenericMemberExtFun <TF> (): kotlin.reflect.KClass<IrErrorType> [inline] declared in <root>.Host'
|
||||
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
|
||||
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
|
||||
RETURN type=kotlin.Nothing from='public final fun classRefGenericMemberExtFun <TF> (): kotlin.reflect.KClass<TF of <root>.Host.classRefGenericMemberExtFun> [inline] declared in <root>.Host'
|
||||
CLASS_REFERENCE 'TYPE_PARAMETER name:TF index:0 variance: superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<TF of <root>.Host.classRefGenericMemberExtFun>
|
||||
PROPERTY name:classRefGenericMemberExtVal visibility:public modality:FINAL [val]
|
||||
FUN name:<get-classRefGenericMemberExtVal> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.reflect.KClass<IrErrorType>
|
||||
FUN name:<get-classRefGenericMemberExtVal> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.reflect.KClass<TV of <uninitialized parent>>
|
||||
correspondingProperty: PROPERTY name:classRefGenericMemberExtVal visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Host
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-classRefGenericMemberExtVal> (): kotlin.reflect.KClass<IrErrorType> declared in <root>.Host'
|
||||
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
|
||||
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-classRefGenericMemberExtVal> (): kotlin.reflect.KClass<TV of <uninitialized parent>> declared in <root>.Host'
|
||||
CLASS_REFERENCE 'TYPE_PARAMETER name:TV index:0 variance: superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<TV of <uninitialized parent>>
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
|
||||
Reference in New Issue
Block a user