[FIR] Support of type arguments in annotations ^KT-48444 Fixed

This commit is contained in:
Ivan Kochurkin
2022-04-06 20:54:26 +03:00
committed by teamcity
parent 05bed8f751
commit 8c7fad9a5e
26 changed files with 465 additions and 36 deletions
@@ -1446,6 +1446,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt");
}
@Test
@TestMetadata("typeArgumentsInAnnotation.kt")
public void testTypeArgumentsInAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/typeArgumentsInAnnotation.kt");
}
@Test
@TestMetadata("typeParameterAsAnnotation.kt")
public void testTypeParameterAsAnnotation() throws Exception {
@@ -1446,6 +1446,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt");
}
@Test
@TestMetadata("typeArgumentsInAnnotation.kt")
public void testTypeArgumentsInAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/typeArgumentsInAnnotation.kt");
}
@Test
@TestMetadata("typeParameterAsAnnotation.kt")
public void testTypeParameterAsAnnotation() throws Exception {
@@ -1446,6 +1446,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt");
}
@Test
@TestMetadata("typeArgumentsInAnnotation.kt")
public void testTypeArgumentsInAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/typeArgumentsInAnnotation.kt");
}
@Test
@TestMetadata("typeParameterAsAnnotation.kt")
public void testTypeParameterAsAnnotation() throws Exception {
@@ -377,7 +377,8 @@ class DeclarationsConverter(
CONSTRUCTOR_CALLEE -> constructorCalleePair = convertConstructorInvocation(unescapedAnnotation)
}
}
val name = (constructorCalleePair.first as? FirUserTypeRef)?.qualifier?.last()?.name ?: Name.special("<no-annotation-name>")
val qualifier = (constructorCalleePair.first as? FirUserTypeRef)?.qualifier?.last()
val name = qualifier?.name ?: Name.special("<no-annotation-name>")
return buildAnnotationCall {
source = unescapedAnnotation.toFirSourceElement()
useSiteTarget = annotationUseSiteTarget ?: defaultAnnotationUseSiteTarget
@@ -392,6 +393,7 @@ class DeclarationsConverter(
this.name = name
}
extractArgumentsFrom(constructorCalleePair.second)
typeArguments += qualifier?.typeArgumentList?.typeArguments ?: listOf()
}
}
@@ -1738,9 +1738,7 @@ open class RawFirBuilder(
referenceExpression!!.toFirSourceElement(),
referenceExpression!!.getReferencedNameAsName(),
FirTypeArgumentListImpl(ktQualifier?.typeArgumentList?.toKtPsiSourceElement() ?: source).apply {
for (typeArgument in ktQualifier!!.typeArguments) {
typeArguments += typeArgument.convert<FirTypeProjection>()
}
typeArguments.appendTypeArguments(ktQualifier!!.typeArguments)
}
)
qualifier.add(firQualifier)
@@ -1809,6 +1807,7 @@ open class RawFirBuilder(
source = (annotationEntry.typeReference?.typeElement as? KtUserType)?.referenceExpression?.toFirSourceElement()
this.name = name
}
typeArguments.appendTypeArguments(annotationEntry.typeArguments)
}
}
@@ -2358,9 +2357,7 @@ open class RawFirBuilder(
return result.apply {
this.explicitReceiver = explicitReceiver
for (typeArgument in expression.typeArguments) {
typeArguments += typeArgument.convert<FirTypeProjection>()
}
typeArguments.appendTypeArguments(expression.typeArguments)
}.build()
}
@@ -2537,6 +2534,12 @@ open class RawFirBuilder(
source = expression.toFirSourceElement()
}
}
private fun MutableList<FirTypeProjection>.appendTypeArguments(args: List<KtTypeProjection>) {
for (typeArgument in args) {
this += typeArgument.convert<FirTypeProjection>()
}
}
}
}
@@ -555,7 +555,7 @@ class FirCallResolver(
explicitReceiver = null,
annotation.argumentList,
isImplicitInvoke = false,
typeArguments = emptyList(),
typeArguments = annotation.typeArguments,
session,
components.file,
components.containingDeclarations
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir.expressions
import org.jetbrains.kotlin.KtSourceElement
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
import org.jetbrains.kotlin.fir.FirElement
import org.jetbrains.kotlin.fir.types.FirTypeProjection
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.*
@@ -23,6 +24,7 @@ abstract class FirAnnotation : FirExpression() {
abstract val useSiteTarget: AnnotationUseSiteTarget?
abstract val annotationTypeRef: FirTypeRef
abstract val argumentMapping: FirAnnotationArgumentMapping
abstract val typeArguments: List<FirTypeProjection>
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R = visitor.visitAnnotation(this, data)
@@ -34,7 +36,11 @@ abstract class FirAnnotation : FirExpression() {
abstract fun replaceArgumentMapping(newArgumentMapping: FirAnnotationArgumentMapping)
abstract fun replaceTypeArguments(newTypeArguments: List<FirTypeProjection>)
abstract override fun <D> transformAnnotations(transformer: FirTransformer<D>, data: D): FirAnnotation
abstract fun <D> transformAnnotationTypeRef(transformer: FirTransformer<D>, data: D): FirAnnotation
abstract fun <D> transformTypeArguments(transformer: FirTransformer<D>, data: D): FirAnnotation
}
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.KtSourceElement
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
import org.jetbrains.kotlin.fir.FirElement
import org.jetbrains.kotlin.fir.references.FirReference
import org.jetbrains.kotlin.fir.types.FirTypeProjection
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.*
@@ -23,6 +24,7 @@ abstract class FirAnnotationCall : FirAnnotation(), FirCall, FirResolvable {
abstract override val annotations: List<FirAnnotation>
abstract override val useSiteTarget: AnnotationUseSiteTarget?
abstract override val annotationTypeRef: FirTypeRef
abstract override val typeArguments: List<FirTypeProjection>
abstract override val argumentList: FirArgumentList
abstract override val calleeReference: FirReference
abstract override val argumentMapping: FirAnnotationArgumentMapping
@@ -35,6 +37,8 @@ abstract class FirAnnotationCall : FirAnnotation(), FirCall, FirResolvable {
abstract override fun replaceTypeRef(newTypeRef: FirTypeRef)
abstract override fun replaceTypeArguments(newTypeArguments: List<FirTypeProjection>)
abstract override fun replaceArgumentList(newArgumentList: FirArgumentList)
abstract override fun replaceCalleeReference(newCalleeReference: FirReference)
@@ -45,5 +49,7 @@ abstract class FirAnnotationCall : FirAnnotation(), FirCall, FirResolvable {
abstract override fun <D> transformAnnotationTypeRef(transformer: FirTransformer<D>, data: D): FirAnnotationCall
abstract override fun <D> transformTypeArguments(transformer: FirTransformer<D>, data: D): FirAnnotationCall
abstract override fun <D> transformCalleeReference(transformer: FirTransformer<D>, data: D): FirAnnotationCall
}
@@ -14,6 +14,7 @@ import org.jetbrains.kotlin.fir.expressions.FirAnnotation
import org.jetbrains.kotlin.fir.expressions.FirAnnotationArgumentMapping
import org.jetbrains.kotlin.fir.expressions.builder.FirExpressionBuilder
import org.jetbrains.kotlin.fir.expressions.impl.FirAnnotationImpl
import org.jetbrains.kotlin.fir.types.FirTypeProjection
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.*
@@ -28,6 +29,7 @@ class FirAnnotationBuilder : FirAnnotationContainerBuilder, FirExpressionBuilder
var useSiteTarget: AnnotationUseSiteTarget? = null
lateinit var annotationTypeRef: FirTypeRef
lateinit var argumentMapping: FirAnnotationArgumentMapping
val typeArguments: MutableList<FirTypeProjection> = mutableListOf()
override fun build(): FirAnnotation {
return FirAnnotationImpl(
@@ -35,6 +37,7 @@ class FirAnnotationBuilder : FirAnnotationContainerBuilder, FirExpressionBuilder
useSiteTarget,
annotationTypeRef,
argumentMapping,
typeArguments,
)
}
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.fir.expressions.builder.FirExpressionBuilder
import org.jetbrains.kotlin.fir.expressions.impl.FirAnnotationCallImpl
import org.jetbrains.kotlin.fir.expressions.impl.FirEmptyAnnotationArgumentMapping
import org.jetbrains.kotlin.fir.references.FirReference
import org.jetbrains.kotlin.fir.types.FirTypeProjection
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImpl
import org.jetbrains.kotlin.fir.visitors.*
@@ -34,6 +35,7 @@ class FirAnnotationCallBuilder : FirCallBuilder, FirAnnotationContainerBuilder,
override var source: KtSourceElement? = null
var useSiteTarget: AnnotationUseSiteTarget? = null
var annotationTypeRef: FirTypeRef = FirImplicitTypeRefImpl(null)
val typeArguments: MutableList<FirTypeProjection> = mutableListOf()
override var argumentList: FirArgumentList = FirEmptyArgumentList
lateinit var calleeReference: FirReference
var argumentMapping: FirAnnotationArgumentMapping = FirEmptyAnnotationArgumentMapping
@@ -43,6 +45,7 @@ class FirAnnotationCallBuilder : FirCallBuilder, FirAnnotationContainerBuilder,
source,
useSiteTarget,
annotationTypeRef,
typeArguments,
argumentList,
calleeReference,
argumentMapping,
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.fir.expressions.FirAnnotationArgumentMapping
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
import org.jetbrains.kotlin.fir.expressions.FirArgumentList
import org.jetbrains.kotlin.fir.references.FirReference
import org.jetbrains.kotlin.fir.types.FirTypeProjection
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.*
@@ -24,6 +25,7 @@ internal class FirAnnotationCallImpl(
override val source: KtSourceElement?,
override val useSiteTarget: AnnotationUseSiteTarget?,
override var annotationTypeRef: FirTypeRef,
override val typeArguments: MutableList<FirTypeProjection>,
override var argumentList: FirArgumentList,
override var calleeReference: FirReference,
override var argumentMapping: FirAnnotationArgumentMapping,
@@ -33,12 +35,14 @@ internal class FirAnnotationCallImpl(
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
annotationTypeRef.accept(visitor, data)
typeArguments.forEach { it.accept(visitor, data) }
argumentList.accept(visitor, data)
calleeReference.accept(visitor, data)
}
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirAnnotationCallImpl {
transformAnnotationTypeRef(transformer, data)
transformTypeArguments(transformer, data)
argumentList = argumentList.transform(transformer, data)
transformCalleeReference(transformer, data)
return this
@@ -53,6 +57,11 @@ internal class FirAnnotationCallImpl(
return this
}
override fun <D> transformTypeArguments(transformer: FirTransformer<D>, data: D): FirAnnotationCallImpl {
typeArguments.transformInplace(transformer, data)
return this
}
override fun <D> transformCalleeReference(transformer: FirTransformer<D>, data: D): FirAnnotationCallImpl {
calleeReference = calleeReference.transform(transformer, data)
return this
@@ -60,6 +69,11 @@ internal class FirAnnotationCallImpl(
override fun replaceTypeRef(newTypeRef: FirTypeRef) {}
override fun replaceTypeArguments(newTypeArguments: List<FirTypeProjection>) {
typeArguments.clear()
typeArguments.addAll(newTypeArguments)
}
override fun replaceArgumentList(newArgumentList: FirArgumentList) {
argumentList = newArgumentList
}
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.KtSourceElement
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
import org.jetbrains.kotlin.fir.expressions.FirAnnotation
import org.jetbrains.kotlin.fir.expressions.FirAnnotationArgumentMapping
import org.jetbrains.kotlin.fir.types.FirTypeProjection
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.*
@@ -22,6 +23,7 @@ internal class FirAnnotationImpl(
override val useSiteTarget: AnnotationUseSiteTarget?,
override var annotationTypeRef: FirTypeRef,
override var argumentMapping: FirAnnotationArgumentMapping,
override val typeArguments: MutableList<FirTypeProjection>,
) : FirAnnotation() {
override val typeRef: FirTypeRef get() = annotationTypeRef
override val annotations: List<FirAnnotation> get() = emptyList()
@@ -29,11 +31,13 @@ internal class FirAnnotationImpl(
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
annotationTypeRef.accept(visitor, data)
argumentMapping.accept(visitor, data)
typeArguments.forEach { it.accept(visitor, data) }
}
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirAnnotationImpl {
transformAnnotationTypeRef(transformer, data)
argumentMapping = argumentMapping.transform(transformer, data)
transformTypeArguments(transformer, data)
return this
}
@@ -46,9 +50,19 @@ internal class FirAnnotationImpl(
return this
}
override fun <D> transformTypeArguments(transformer: FirTransformer<D>, data: D): FirAnnotationImpl {
typeArguments.transformInplace(transformer, data)
return this
}
override fun replaceTypeRef(newTypeRef: FirTypeRef) {}
override fun replaceArgumentMapping(newArgumentMapping: FirAnnotationArgumentMapping) {
argumentMapping = newArgumentMapping
}
override fun replaceTypeArguments(newTypeArguments: List<FirTypeProjection>) {
typeArguments.clear()
typeArguments.addAll(newTypeArguments)
}
}
@@ -458,6 +458,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
+field("useSiteTarget", annotationUseSiteTargetType, nullable = true)
+field("annotationTypeRef", typeRef).withTransform()
+field("argumentMapping", annotationArgumentMapping, withReplace = true)
+typeArguments.withTransform()
}
annotationCall.configure {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: generic annotation aren't supported in FIR inference yet; see also KT-46967
// MODULE: lib
// FILE: l1.kt
package ann
@@ -0,0 +1,8 @@
// FIR_IDENTICAL
// ISSUE: KT-48444
annotation class Foo<T>(val s: String)
@Foo<Int>("")
fun foo() {
}
@@ -0,0 +1,11 @@
package
@Foo<kotlin.Int>(s = "") public fun foo(): kotlin.Unit
public final annotation class Foo</*0*/ T> : kotlin.Annotation {
public constructor Foo</*0*/ T>(/*0*/ s: kotlin.String)
public final val s: kotlin.String
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,244 @@
FILE fqName:ann fileName:/genericAnnotationClasses.kt
CLASS ANNOTATION_CLASS name:Test1 modality:OPEN visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.Test1<T of ann.Test1>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:ann.Test1<T of ann.Test1> [primary]
VALUE_PARAMETER name:x index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test1 modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: kotlin.Int declared in ann.Test1.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:ann.Test1<T of ann.Test1>) returnType:kotlin.Int
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:ann.Test1<T of ann.Test1>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in ann.Test1'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: ann.Test1<T of ann.Test1> declared in ann.Test1.<get-x>' type=ann.Test1<T of ann.Test1> origin=null
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 [fake_override,operator] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ANNOTATION_CLASS name:Test2 modality:OPEN visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.Test2<T1 of ann.Test2, T2 of ann.Test2>
TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any] reified:false
TYPE_PARAMETER name:T2 index:1 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:ann.Test2<T1 of ann.Test2, T2 of ann.Test2> [primary]
VALUE_PARAMETER name:x index:0 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test2 modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: kotlin.Int declared in ann.Test2.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:ann.Test2<T1 of ann.Test2, T2 of ann.Test2>) returnType:kotlin.Int
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:ann.Test2<T1 of ann.Test2, T2 of ann.Test2>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in ann.Test2'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: ann.Test2<T1 of ann.Test2, T2 of ann.Test2> declared in ann.Test2.<get-x>' type=ann.Test2<T1 of ann.Test2, T2 of ann.Test2> origin=null
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 [fake_override,operator] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:I modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.I<T of ann.I>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
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
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ANNOTATION_CLASS name:Test3 modality:OPEN visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.Test3<T1 of ann.Test3, T2 of ann.Test3>
TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:T2 index:1 variance: superTypes:[ann.I<T1 of ann.Test3>] reified:false
CONSTRUCTOR visibility:public <> (x:ann.Test1<ann.I<T2 of ann.Test3>>) returnType:ann.Test3<T1 of ann.Test3, T2 of ann.Test3> [primary]
VALUE_PARAMETER name:x index:0 type:ann.Test1<ann.I<T2 of ann.Test3>>
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test3 modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:ann.Test1<ann.I<T2 of ann.Test3>> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: ann.Test1<ann.I<T2 of ann.Test3>> declared in ann.Test3.<init>' type=ann.Test1<ann.I<T2 of ann.Test3>> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:ann.Test3<T1 of ann.Test3, T2 of ann.Test3>) returnType:ann.Test1<ann.I<T2 of ann.Test3>>
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:ann.Test3<T1 of ann.Test3, T2 of ann.Test3>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): ann.Test1<ann.I<T2 of ann.Test3>> declared in ann.Test3'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:ann.Test1<ann.I<T2 of ann.Test3>> visibility:private [final]' type=ann.Test1<ann.I<T2 of ann.Test3>> origin=null
receiver: GET_VAR '<this>: ann.Test3<T1 of ann.Test3, T2 of ann.Test3> declared in ann.Test3.<get-x>' type=ann.Test3<T1 of ann.Test3, T2 of ann.Test3> origin=null
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 [fake_override,operator] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[ann.I<T of ann.C>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.C<T of ann.C>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> () returnType:ann.C<T of ann.C> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[ann.I<T of ann.C>]'
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 [fake_override,operator] declared in ann.I
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in ann.I
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in ann.I
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ANNOTATION_CLASS name:Test4 modality:OPEN visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.Test4
CONSTRUCTOR visibility:public <> (x:kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>>) returnType:ann.Test4 [primary]
VALUE_PARAMETER name:x index:0 type:kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>>
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test4 modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>> declared in ann.Test4.<init>' type=kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:ann.Test4) returnType:kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>>
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:ann.Test4
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>> declared in ann.Test4'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>> visibility:private [final]' type=kotlin.Array<ann.Test3<kotlin.Int, ann.C<kotlin.Int>>> origin=null
receiver: GET_VAR '<this>: ann.Test4 declared in ann.Test4.<get-x>' type=ann.Test4 origin=null
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 [fake_override,operator] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:ARG modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.ARG
CONSTRUCTOR visibility:public <> () returnType:ann.ARG [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ARG modality:FINAL visibility:public superTypes:[kotlin.Any]'
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
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ANNOTATION_CLASS name:Test5 modality:OPEN visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.Test5<T of ann.Test5>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (xs:kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>>) returnType:ann.Test5<T of ann.Test5> [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>> varargElementType:ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>> [vararg]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test5 modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:xs visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'xs: kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>> [vararg] declared in ann.Test5.<init>' type=kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xs> visibility:public modality:FINAL <> ($this:ann.Test5<T of ann.Test5>) returnType:kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>>
correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:ann.Test5<T of ann.Test5>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-xs> (): kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>> declared in ann.Test5'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>> visibility:private [final]' type=kotlin.Array<out ann.Test3<T of ann.Test5, ann.C<T of ann.Test5>>> origin=null
receiver: GET_VAR '<this>: ann.Test5<T of ann.Test5> declared in ann.Test5.<get-xs>' type=ann.Test5<T of ann.Test5> origin=null
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 [fake_override,operator] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:CC modality:FINAL visibility:public superTypes:[kotlin.Any]
annotations:
Test1(x = '42')
Test2(x = '38')
Test3(x = Test1<ann.I<ann.C<kotlin.String>>>(x = '39'))
Test4(x = [Test3<IrErrorType(null), IrErrorType(null)>(x = Test1<IrErrorType(null)>(x = '40')), Test3<IrErrorType(null), IrErrorType(null)>(x = Test1<IrErrorType(null)>(x = '50')), Test3<IrErrorType(null), IrErrorType(null)>(x = Test1<IrErrorType(null)>(x = '60'))])
Test5(xs = [Test3<ann.ARG, ann.C<ann.ARG>>(x = Test1<ann.I<ann.C<ann.ARG>>>(x = '70')), Test3<ann.ARG, ann.C<ann.ARG>>(x = Test1<ann.I<ann.C<ann.ARG>>>(x = '80'))])
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.CC
CONSTRUCTOR visibility:public <> () returnType:ann.CC [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CC modality:FINAL visibility:public superTypes:[kotlin.Any]'
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
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -0,0 +1,102 @@
package ann
open annotation class Test1<T : Any?> : Annotation {
constructor(x: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = x
get
}
open annotation class Test2<T1 : Any, T2 : Any?> : Annotation {
constructor(x: Int = 0) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = x
get
}
interface I<T : Any?> {
}
open annotation class Test3<T1 : Any?, T2 : I<T1>> : Annotation {
constructor(x: Test1<I<T2>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Test1<I<T2>>
field = x
get
}
class C<T : Any?> : I<T> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
open annotation class Test4 : Annotation {
constructor(x: Array<Test3<Int, C<Int>>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Array<Test3<Int, C<Int>>>
field = x
get
}
class ARG {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
open annotation class Test5<T : Any?> : Annotation {
constructor(vararg xs: Test3<T, C<T>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
val xs: Array<out Test3<T, C<T>>>
field = xs
get
}
@Test1(x = 42)
@Test2(x = 38)
@Test3(x = Test1<I<C<String>>>(x = 39))
@Test4(x = [Test3<ErrorType, ErrorType>(x = Test1<ErrorType>(x = 40)), Test3<ErrorType, ErrorType>(x = Test1<ErrorType>(x = 50)), Test3<ErrorType, ErrorType>(x = Test1<ErrorType>(x = 60))])
@Test5(xs = [Test3<ARG, C<ARG>>(x = Test1<I<C<ARG>>>(x = 70)), Test3<ARG, C<ARG>>(x = Test1<I<C<ARG>>>(x = 80))])
class CC {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
package ann
annotation class Test1<T>(val x: Int)
@@ -1452,6 +1452,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt");
}
@Test
@TestMetadata("typeArgumentsInAnnotation.kt")
public void testTypeArgumentsInAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/typeArgumentsInAnnotation.kt");
}
@Test
@TestMetadata("typeParameterAsAnnotation.kt")
public void testTypeParameterAsAnnotation() throws Exception {
@@ -1,6 +1,4 @@
// WITH_STDLIB
// fir doesn't support annotations with type arguments
// IGNORE_BACKEND_FIR: JVM_IR
@file:JvmName("TestKt")
package test
@@ -1,6 +1,4 @@
// WITH_STDLIB
// fir doesn't support annotations with type arguments
// IGNORE_BACKEND_FIR: JVM_IR
@file:JvmName("TestKt")
package test
@@ -2,8 +2,6 @@
// See KT-38107
// The JVM backend is missing support for custom parcelers in List<String>
// WITH_STDLIB
// fir doesn't support annotations with type arguments
// IGNORE_BACKEND_FIR: JVM_IR
@file:JvmName("TestKt")
package test
@@ -1,6 +1,4 @@
// WITH_STDLIB
// fir doesn't support annotations with type arguments
// IGNORE_BACKEND_FIR: JVM_IR
@file:JvmName("TestKt")
package test
@@ -19,27 +19,27 @@ class StringClassParceler : Parceler<String> {
override fun String.write(parcel: Parcel, flags: Int) = TODO()
}
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringParceler>
class MissingParcelizeAnnotation(val a: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringParceler> String)
@TypeParceler<String, StringParceler>
class MissingParcelizeAnnotation(val a: @WriteWith<StringParceler> String)
@Parcelize
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringClassParceler>
class ShouldBeClass(val a: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringClassParceler> String) : Parcelable
@TypeParceler<String, StringClassParceler>
class ShouldBeClass(val a: @WriteWith<StringClassParceler> String) : Parcelable
@Parcelize
class Test(
val a: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringParceler> Int,
val b: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringParceler> String,
val c: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringParceler> CharSequence,
val d: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><CharSequenceParceler> String,
val e: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><CharSequenceParceler> CharSequence
val a: @WriteWith<StringParceler> Int,
val b: @WriteWith<StringParceler> String,
val c: @WriteWith<StringParceler> CharSequence,
val d: @WriteWith<CharSequenceParceler> String,
val e: @WriteWith<CharSequenceParceler> CharSequence
) : Parcelable
@Parcelize
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringParceler>
class Test2(@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringParceler> val a: String) : Parcelable
@TypeParceler<String, StringParceler>
class Test2(@TypeParceler<String, StringParceler> val a: String) : Parcelable
@Parcelize
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringParceler>
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, CharSequenceParceler>
@TypeParceler<String, StringParceler>
@TypeParceler<String, CharSequenceParceler>
class Test3(val a: String) : Parcelable
@@ -22,11 +22,11 @@ object <!DEPRECATED_PARCELER!>Parceler2<!> : Parceler<List<String>> {
}
<!DEPRECATED_ANNOTATION!>@Parcelize<!>
<!FORBIDDEN_DEPRECATED_ANNOTATION!>@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, Parceler2><!>
<!FORBIDDEN_DEPRECATED_ANNOTATION!>@TypeParceler<String, Parceler2><!>
data class Test(
val a: String,
val b: <!FORBIDDEN_DEPRECATED_ANNOTATION!>@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><Parceler1><!> String,
val c: <!FORBIDDEN_DEPRECATED_ANNOTATION!>@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><Parceler2><!> List<<!FORBIDDEN_DEPRECATED_ANNOTATION!>@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><Parceler1><!> String>
val b: <!FORBIDDEN_DEPRECATED_ANNOTATION!>@WriteWith<Parceler1><!> String,
val c: <!FORBIDDEN_DEPRECATED_ANNOTATION!>@WriteWith<Parceler2><!> List<<!FORBIDDEN_DEPRECATED_ANNOTATION!>@WriteWith<Parceler1><!> String>
) : Parcelable {
<!DEPRECATED_ANNOTATION!>@IgnoredOnParcel<!>
val x by lazy { "foo" }