Revert "[FIR] Support deserialization of annotations on JVM"
This is needed because of that commit tragically decreases performance, so this changes will be delayed for now
This commit is contained in:
+7
-28
@@ -31,67 +31,46 @@ import org.jetbrains.kotlin.metadata.ProtoBuf
|
||||
import org.jetbrains.kotlin.metadata.ProtoBuf.Annotation.Argument.Value.Type.*
|
||||
import org.jetbrains.kotlin.metadata.deserialization.Flags
|
||||
import org.jetbrains.kotlin.metadata.deserialization.NameResolver
|
||||
import org.jetbrains.kotlin.metadata.deserialization.TypeTable
|
||||
import org.jetbrains.kotlin.serialization.deserialization.builtins.BuiltInSerializerProtocol
|
||||
import org.jetbrains.kotlin.serialization.deserialization.getClassId
|
||||
import org.jetbrains.kotlin.serialization.deserialization.getName
|
||||
|
||||
abstract class AbstractAnnotationDeserializer(
|
||||
protected val session: FirSession
|
||||
private val session: FirSession
|
||||
) {
|
||||
protected val protocol = BuiltInSerializerProtocol
|
||||
|
||||
open fun loadClassAnnotations(classProto: ProtoBuf.Class, nameResolver: NameResolver): List<FirAnnotationCall> {
|
||||
fun loadClassAnnotations(classProto: ProtoBuf.Class, nameResolver: NameResolver): List<FirAnnotationCall> {
|
||||
if (!Flags.HAS_ANNOTATIONS.get(classProto.flags)) return emptyList()
|
||||
val annotations = classProto.getExtension(protocol.classAnnotation).orEmpty()
|
||||
return annotations.map { deserializeAnnotation(it, nameResolver) }
|
||||
}
|
||||
|
||||
open fun loadFunctionAnnotations(
|
||||
containingDeclaration: ProtoContainer,
|
||||
functionProto: ProtoBuf.Function,
|
||||
nameResolver: NameResolver,
|
||||
typeTable: TypeTable
|
||||
): List<FirAnnotationCall> {
|
||||
fun loadFunctionAnnotations(functionProto: ProtoBuf.Function, nameResolver: NameResolver): List<FirAnnotationCall> {
|
||||
if (!Flags.HAS_ANNOTATIONS.get(functionProto.flags)) return emptyList()
|
||||
val annotations = functionProto.getExtension(protocol.functionAnnotation).orEmpty()
|
||||
return annotations.map { deserializeAnnotation(it, nameResolver) }
|
||||
}
|
||||
|
||||
open fun loadPropertyAnnotations(
|
||||
containingDeclaration: ProtoContainer,
|
||||
propertyProto: ProtoBuf.Property,
|
||||
nameResolver: NameResolver,
|
||||
typeTable: TypeTable
|
||||
): List<FirAnnotationCall> {
|
||||
fun loadPropertyAnnotations(propertyProto: ProtoBuf.Property, nameResolver: NameResolver): List<FirAnnotationCall> {
|
||||
if (!Flags.HAS_ANNOTATIONS.get(propertyProto.flags)) return emptyList()
|
||||
val annotations = propertyProto.getExtension(protocol.propertyAnnotation).orEmpty()
|
||||
return annotations.map { deserializeAnnotation(it, nameResolver) }
|
||||
}
|
||||
|
||||
open fun loadConstructorAnnotations(
|
||||
containingDeclaration: ProtoContainer,
|
||||
constructorProto: ProtoBuf.Constructor,
|
||||
nameResolver: NameResolver,
|
||||
typeTable: TypeTable
|
||||
): List<FirAnnotationCall> {
|
||||
fun loadConstructorAnnotations(constructorProto: ProtoBuf.Constructor, nameResolver: NameResolver): List<FirAnnotationCall> {
|
||||
if (!Flags.HAS_ANNOTATIONS.get(constructorProto.flags)) return emptyList()
|
||||
val annotations = constructorProto.getExtension(protocol.constructorAnnotation).orEmpty()
|
||||
return annotations.map { deserializeAnnotation(it, nameResolver) }
|
||||
}
|
||||
|
||||
open fun loadValueParameterAnnotations(
|
||||
containingDeclaration: ProtoContainer,
|
||||
valueParameterProto: ProtoBuf.ValueParameter,
|
||||
nameResolver: NameResolver,
|
||||
typeTable: TypeTable
|
||||
): List<FirAnnotationCall> {
|
||||
fun loadValueParameterAnnotations(valueParameterProto: ProtoBuf.ValueParameter, nameResolver: NameResolver): List<FirAnnotationCall> {
|
||||
if (!Flags.HAS_ANNOTATIONS.get(valueParameterProto.flags)) return emptyList()
|
||||
val annotations = valueParameterProto.getExtension(protocol.parameterAnnotation).orEmpty()
|
||||
return annotations.map { deserializeAnnotation(it, nameResolver) }
|
||||
}
|
||||
|
||||
abstract fun loadTypeAnnotations(containingDeclaration: ProtoContainer, typeProto: ProtoBuf.Type, nameResolver: NameResolver, typeTable: TypeTable): List<FirAnnotationCall>
|
||||
abstract fun loadTypeAnnotations(typeProto: ProtoBuf.Type, nameResolver: NameResolver): List<FirAnnotationCall>
|
||||
|
||||
fun deserializeAnnotation(proto: ProtoBuf.Annotation, nameResolver: NameResolver): FirAnnotationCall {
|
||||
val classId = nameResolver.getClassId(proto.id)
|
||||
|
||||
+2
-11
@@ -63,18 +63,9 @@ fun deserializeClassToSymbol(
|
||||
classProto.typeParameterList,
|
||||
nameResolver,
|
||||
TypeTable(classProto.typeTable),
|
||||
classId.relativeClassName,
|
||||
ProtoContainer.Class(
|
||||
classProto,
|
||||
parentContext.containingDeclaration as? ProtoContainer.Class,
|
||||
classId,
|
||||
null
|
||||
)
|
||||
classId.relativeClassName
|
||||
) ?: FirDeserializationContext.createForClass(
|
||||
classId,
|
||||
classProto,
|
||||
nameResolver,
|
||||
session,
|
||||
classId, classProto, nameResolver, session,
|
||||
defaultAnnotationDeserializer ?: FirBuiltinAnnotationDeserializer(session)
|
||||
)
|
||||
classBuilder.apply {
|
||||
|
||||
+1
-7
@@ -10,18 +10,12 @@ import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.metadata.ProtoBuf
|
||||
import org.jetbrains.kotlin.metadata.deserialization.Flags
|
||||
import org.jetbrains.kotlin.metadata.deserialization.NameResolver
|
||||
import org.jetbrains.kotlin.metadata.deserialization.TypeTable
|
||||
|
||||
class FirBuiltinAnnotationDeserializer(
|
||||
session: FirSession
|
||||
) : AbstractAnnotationDeserializer(session) {
|
||||
|
||||
override fun loadTypeAnnotations(
|
||||
containigDeclaration: ProtoContainer,
|
||||
typeProto: ProtoBuf.Type,
|
||||
nameResolver: NameResolver,
|
||||
typeTable: TypeTable
|
||||
): List<FirAnnotationCall> {
|
||||
override fun loadTypeAnnotations(typeProto: ProtoBuf.Type, nameResolver: NameResolver): List<FirAnnotationCall> {
|
||||
if (!Flags.HAS_ANNOTATIONS.get(typeProto.flags)) return emptyList()
|
||||
val annotations = typeProto.getExtension(protocol.typeAnnotation).orEmpty()
|
||||
return annotations.map { deserializeAnnotation(it, nameResolver) }
|
||||
|
||||
+14
-44
@@ -6,14 +6,11 @@
|
||||
package org.jetbrains.kotlin.fir.deserialization
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.SourceElement
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.*
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.builder.buildExpressionStub
|
||||
import org.jetbrains.kotlin.fir.symbols.CallableId
|
||||
@@ -40,21 +37,19 @@ class FirDeserializationContext(
|
||||
val relativeClassName: FqName?,
|
||||
val typeDeserializer: FirTypeDeserializer,
|
||||
val annotationDeserializer: AbstractAnnotationDeserializer,
|
||||
val components: FirDeserializationComponents,
|
||||
val containingDeclaration: ProtoContainer
|
||||
val components: FirDeserializationComponents
|
||||
) {
|
||||
fun childContext(
|
||||
typeParameterProtos: List<ProtoBuf.TypeParameter>,
|
||||
nameResolver: NameResolver = this.nameResolver,
|
||||
typeTable: TypeTable = this.typeTable,
|
||||
relativeClassName: FqName? = this.relativeClassName,
|
||||
containingDeclaration: ProtoContainer = this.containingDeclaration
|
||||
relativeClassName: FqName? = this.relativeClassName
|
||||
): FirDeserializationContext = FirDeserializationContext(
|
||||
nameResolver, typeTable, versionRequirementTable, session, packageFqName, relativeClassName,
|
||||
FirTypeDeserializer(
|
||||
session, nameResolver, typeTable, typeParameterProtos, typeDeserializer
|
||||
),
|
||||
annotationDeserializer, components, containingDeclaration
|
||||
annotationDeserializer, components
|
||||
)
|
||||
|
||||
val memberDeserializer: FirMemberDeserializer = FirMemberDeserializer(this)
|
||||
@@ -65,8 +60,7 @@ class FirDeserializationContext(
|
||||
packageProto: ProtoBuf.Package,
|
||||
nameResolver: NameResolver,
|
||||
session: FirSession,
|
||||
annotationDeserializer: AbstractAnnotationDeserializer,
|
||||
sourceElement: SourceElement?
|
||||
annotationDeserializer: AbstractAnnotationDeserializer
|
||||
) = createRootContext(
|
||||
nameResolver,
|
||||
TypeTable(packageProto.typeTable),
|
||||
@@ -74,8 +68,7 @@ class FirDeserializationContext(
|
||||
annotationDeserializer,
|
||||
fqName,
|
||||
relativeClassName = null,
|
||||
typeParameterProtos = emptyList(),
|
||||
ProtoContainer.Package(fqName, sourceElement)
|
||||
typeParameterProtos = emptyList()
|
||||
)
|
||||
|
||||
fun createForClass(
|
||||
@@ -91,8 +84,7 @@ class FirDeserializationContext(
|
||||
annotationDeserializer,
|
||||
classId.packageFqName,
|
||||
classId.relativeClassName,
|
||||
classProto.typeParameterList,
|
||||
ProtoContainer.Class(classProto, outerClass = null, classId, null)
|
||||
classProto.typeParameterList
|
||||
)
|
||||
|
||||
private fun createRootContext(
|
||||
@@ -102,8 +94,7 @@ class FirDeserializationContext(
|
||||
annotationDeserializer: AbstractAnnotationDeserializer,
|
||||
packageFqName: FqName,
|
||||
relativeClassName: FqName?,
|
||||
typeParameterProtos: List<ProtoBuf.TypeParameter>,
|
||||
containingDeclaration: ProtoContainer
|
||||
typeParameterProtos: List<ProtoBuf.TypeParameter>
|
||||
): FirDeserializationContext {
|
||||
return FirDeserializationContext(
|
||||
nameResolver, typeTable,
|
||||
@@ -119,8 +110,7 @@ class FirDeserializationContext(
|
||||
null
|
||||
),
|
||||
annotationDeserializer,
|
||||
FirDeserializationComponents(),
|
||||
containingDeclaration
|
||||
FirDeserializationComponents()
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -190,12 +180,7 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
|
||||
|
||||
resolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES
|
||||
typeParameters += local.typeDeserializer.ownTypeParameters.map { it.fir }
|
||||
annotations += c.annotationDeserializer.loadPropertyAnnotations(
|
||||
c.containingDeclaration,
|
||||
proto,
|
||||
local.nameResolver,
|
||||
local.typeTable
|
||||
)
|
||||
annotations += c.annotationDeserializer.loadPropertyAnnotations(proto, local.nameResolver)
|
||||
getter = FirDefaultPropertyGetter(null, c.session, returnTypeRef, ProtoEnumFlags.visibility(Flags.VISIBILITY.get(getterFlags)))
|
||||
setter = if (isVar) {
|
||||
FirDefaultPropertySetter(null, c.session, returnTypeRef, ProtoEnumFlags.visibility(Flags.VISIBILITY.get(setterFlags)))
|
||||
@@ -243,12 +228,7 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
|
||||
resolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES
|
||||
typeParameters += local.typeDeserializer.ownTypeParameters.map { it.fir }
|
||||
valueParameters += local.memberDeserializer.valueParameters(proto.valueParameterList)
|
||||
annotations += local.annotationDeserializer.loadFunctionAnnotations(
|
||||
c.containingDeclaration,
|
||||
proto,
|
||||
local.nameResolver,
|
||||
local.typeTable
|
||||
)
|
||||
annotations += local.annotationDeserializer.loadFunctionAnnotations(proto, local.nameResolver)
|
||||
this.containerSource = containerSource
|
||||
}
|
||||
if (proto.hasContract()) {
|
||||
@@ -295,7 +275,7 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
|
||||
valueParameters += local.memberDeserializer.valueParameters(
|
||||
proto.valueParameterList, addDefaultValue = classBuilder.symbol.classId == StandardClassIds.Enum
|
||||
)
|
||||
annotations += local.annotationDeserializer.loadConstructorAnnotations(c.containingDeclaration, proto, local.nameResolver, local.typeTable)
|
||||
annotations += local.annotationDeserializer.loadConstructorAnnotations(proto, local.nameResolver)
|
||||
}.build()
|
||||
}
|
||||
|
||||
@@ -325,12 +305,7 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
|
||||
isCrossinline = Flags.IS_CROSSINLINE.get(flags)
|
||||
isNoinline = Flags.IS_NOINLINE.get(flags)
|
||||
isVararg = proto.varargElementType(c.typeTable) != null
|
||||
annotations += c.annotationDeserializer.loadValueParameterAnnotations(
|
||||
c.containingDeclaration,
|
||||
proto,
|
||||
c.nameResolver,
|
||||
c.typeTable
|
||||
)
|
||||
annotations += c.annotationDeserializer.loadValueParameterAnnotations(proto, c.nameResolver)
|
||||
}
|
||||
}.toList()
|
||||
}
|
||||
@@ -338,12 +313,7 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
|
||||
private fun ProtoBuf.Type.toTypeRef(context: FirDeserializationContext): FirTypeRef {
|
||||
return buildResolvedTypeRef {
|
||||
type = context.typeDeserializer.type(this@toTypeRef)
|
||||
annotations += context.annotationDeserializer.loadTypeAnnotations(
|
||||
c.containingDeclaration,
|
||||
this@toTypeRef,
|
||||
context.nameResolver,
|
||||
context.typeTable
|
||||
)
|
||||
annotations += context.annotationDeserializer.loadTypeAnnotations(this@toTypeRef, context.nameResolver)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2020 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.deserialization
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.SourceElement
|
||||
import org.jetbrains.kotlin.metadata.ProtoBuf
|
||||
import org.jetbrains.kotlin.metadata.deserialization.Flags
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
sealed class ProtoContainer(
|
||||
val sourceElement: SourceElement?
|
||||
) {
|
||||
class Class(
|
||||
val classProto: ProtoBuf.Class,
|
||||
val outerClass: Class?,
|
||||
val classId: ClassId,
|
||||
sourceElement: SourceElement?
|
||||
) : ProtoContainer(sourceElement) {
|
||||
val kind: ProtoBuf.Class.Kind = Flags.CLASS_KIND.get(classProto.flags) ?: ProtoBuf.Class.Kind
|
||||
.CLASS
|
||||
val isInner: Boolean = Flags.IS_INNER.get(classProto.flags)
|
||||
|
||||
override fun debugFqName(): FqName = classId.asSingleFqName()
|
||||
}
|
||||
|
||||
class Package(
|
||||
val fqName: FqName,
|
||||
sourceElement: SourceElement?
|
||||
) : ProtoContainer(sourceElement) {
|
||||
override fun debugFqName(): FqName = fqName
|
||||
}
|
||||
|
||||
abstract fun debugFqName(): FqName
|
||||
|
||||
override fun toString() = "${this::class.java.simpleName}: ${debugFqName()}"
|
||||
}
|
||||
+1
-1
@@ -77,7 +77,7 @@ class FirBuiltinSymbolProvider(val session: FirSession, val kotlinScopeProvider:
|
||||
private val memberDeserializer by lazy {
|
||||
FirDeserializationContext.createForPackage(
|
||||
fqName, packageProto.`package`, nameResolver, session,
|
||||
FirBuiltinAnnotationDeserializer(session), null
|
||||
FirBuiltinAnnotationDeserializer(session),
|
||||
).memberDeserializer
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
@R|test/Anno|() public final fun foo(): R|kotlin/Unit|
|
||||
public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public final val t: R|java/lang/annotation/ElementType|
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
@R|test/Anno|() public final fun baz(): R|kotlin/Unit|
|
||||
public final fun baz(): R|kotlin/Unit|
|
||||
|
||||
@R|test/Anno|() public final fun foo(): R|kotlin/Unit|
|
||||
public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public final val t: R|kotlin/Array<out java/lang/annotation/ElementType>|
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
@R|test/Anno|() public final fun function(): R|kotlin/Unit|
|
||||
public final fun function(): R|kotlin/Unit|
|
||||
|
||||
public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public constructor(): R|test/Anno|
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
@R|test/Anno|() public final fun baz(): R|kotlin/Unit|
|
||||
public final fun baz(): R|kotlin/Unit|
|
||||
|
||||
@R|test/Anno|() public final fun foo(): R|kotlin/Unit|
|
||||
public final fun foo(): R|kotlin/Unit|
|
||||
|
||||
public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public final val t: R|kotlin/Array<out kotlin/String>|
|
||||
|
||||
@@ -41,14 +41,14 @@ FILE: delegateTypeMismatch.kt
|
||||
D|/A.classifierNamePolicy|.R|FakeOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(this@R|/A|, ::R|/A.classifierNamePolicy|, R|<local>/classifierNamePolicy|)
|
||||
}
|
||||
|
||||
public final var typeNormalizer: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>by <Inapplicable(INAPPLICABLE): [/A.property]>#<R|(KotlinType) -> KotlinType|>(property@fun <anonymous>(): R|ERROR CLASS: Unresolved name: it| {
|
||||
public final var typeNormalizer: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/getValue, kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>by <Inapplicable(INAPPLICABLE): [/A.property]>#<R|(KotlinType) -> KotlinType|>(property@fun <anonymous>(): R|ERROR CLASS: Unresolved name: it| {
|
||||
^ <Unresolved name: it>#
|
||||
}
|
||||
)
|
||||
public get(): <ERROR TYPE REF: Ambiguity: getValue, [kotlin/getValue, kotlin/collections/getValue, kotlin/collections/getValue]> {
|
||||
^ D|/A.typeNormalizer|.<Ambiguity: getValue, [kotlin/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>#(this@R|/A|, ::R|/A.typeNormalizer|)
|
||||
public get(): <ERROR TYPE REF: Ambiguity: getValue, [kotlin/getValue, kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]> {
|
||||
^ D|/A.typeNormalizer|.<Ambiguity: getValue, [kotlin/getValue, kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>#(this@R|/A|, ::R|/A.typeNormalizer|)
|
||||
}
|
||||
public set(<set-?>: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>): R|kotlin/Unit| {
|
||||
public set(<set-?>: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/getValue, kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>): R|kotlin/Unit| {
|
||||
D|/A.typeNormalizer|.<Inapplicable(INAPPLICABLE): [kotlin/collections/setValue]>#(this@R|/A|, ::R|/A.typeNormalizer|, R|<local>/typeNormalizer|)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
class A {
|
||||
val x by mutableMapOf<String, Int>()
|
||||
val y: Int by mutableMapOf<String, Int>()
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
FILE: delegationByMap.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val x: R|kotlin/Int|by R|kotlin/collections/mutableMapOf|<R|kotlin/String|, R|kotlin/Int|>()
|
||||
public get(): R|kotlin/Int| {
|
||||
^ D|/A.x|.R|kotlin/collections/getValue|<R|kotlin/Int|, R|kotlin/Int|>(this@R|/A|, ::R|/A.x|)
|
||||
}
|
||||
|
||||
public final val y: R|kotlin/Int|by R|kotlin/collections/mutableMapOf|<R|kotlin/String|, R|kotlin/Int|>()
|
||||
public get(): R|kotlin/Int| {
|
||||
^ D|/A.y|.R|kotlin/collections/getValue|<R|kotlin/Int|, R|kotlin/Int|>(this@R|/A|, ::R|/A.y|)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,19 +7,19 @@ FILE: simpleDelegatedToMap.kt
|
||||
public final val map: R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>| = R|<local>/map|
|
||||
public get(): R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>|
|
||||
|
||||
public final var foo: R|kotlin/Any|by R|<local>/map|
|
||||
public get(): R|kotlin/Any| {
|
||||
^ D|/C.foo|.R|kotlin/collections/getValue|<R|kotlin/Any|, R|kotlin/Any|>(this@R|/C|, ::R|/C.foo|)
|
||||
public final var foo: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>by R|<local>/map|
|
||||
public get(): <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]> {
|
||||
^ D|/C.foo|.<Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>#(this@R|/C|, ::R|/C.foo|)
|
||||
}
|
||||
public set(<set-?>: R|kotlin/Any|): R|kotlin/Unit| {
|
||||
D|/C.foo|.R|kotlin/collections/setValue|<R|kotlin/Any|>(this@R|/C|, ::R|/C.foo|, R|<local>/foo|)
|
||||
public set(<set-?>: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>): R|kotlin/Unit| {
|
||||
D|/C.foo|.<Inapplicable(INAPPLICABLE): [kotlin/collections/setValue]>#(this@R|/C|, ::R|/C.foo|, R|<local>/foo|)
|
||||
}
|
||||
|
||||
}
|
||||
public final var bar: R|ft<kotlin/Any, kotlin/Any?>!|by R|kotlin/collections/hashMapOf|<R|kotlin/String|, R|kotlin/Any|>()
|
||||
public get(): R|ft<kotlin/Any, kotlin/Any?>!| {
|
||||
^ D|/bar|.R|kotlin/collections/getValue|<R|ft<kotlin/Any, kotlin/Any?>!|, R|ft<kotlin/Any, kotlin/Any?>!|>(Null(null), ::R|/bar|)
|
||||
public final var bar: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>by R|kotlin/collections/hashMapOf|<R|kotlin/String|, R|kotlin/Any|>()
|
||||
public get(): <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]> {
|
||||
^ D|/bar|.<Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>#(Null(null), ::R|/bar|)
|
||||
}
|
||||
public set(<set-?>: R|ft<kotlin/Any, kotlin/Any?>!|): R|kotlin/Unit| {
|
||||
D|/bar|.R|kotlin/collections/setValue|<R|ft<kotlin/Any, kotlin/Any?>!|>(Null(null), ::R|/bar|, R|<local>/bar|)
|
||||
public set(<set-?>: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>): R|kotlin/Unit| {
|
||||
D|/bar|.<Inapplicable(INAPPLICABLE): [kotlin/collections/setValue]>#(Null(null), ::R|/bar|, R|<local>/bar|)
|
||||
}
|
||||
|
||||
Generated
-5
@@ -93,11 +93,6 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic
|
||||
runTest("compiler/fir/resolve/testData/resolveWithStdlib/delegateWithAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationByMap.kt")
|
||||
public void testDelegationByMap() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolveWithStdlib/delegationByMap.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyArray.kt")
|
||||
public void testEmptyArray() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolveWithStdlib/emptyArray.kt");
|
||||
|
||||
Reference in New Issue
Block a user