提交 607a598f 编写于 作者: R Roman Artemev

[IR] Add irText test for generic annotations

上级 79935e29
......@@ -575,6 +575,12 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt");
}
@Test
@TestMetadata("genericAnnotationClasses.kt")
public void testGenericAnnotationClasses() throws Exception {
runTest("compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt");
}
@Test
@TestMetadata("inheritingDeprecation.kt")
public void testInheritingDeprecation() throws Exception {
......
package ann
annotation class Test1<T : Any?> : Annotation {
constructor(x: Int) /* primary */
val x: Int
field = x
get
}
annotation class Test2<T1 : Any, T2 : Any?> : Annotation {
constructor(x: Int = 0) /* primary */
val x: Int
field = x
get
}
interface I<T : Any?> {
}
annotation class Test3<T1 : Any?, T2 : I<T1>> : Annotation {
constructor(x: Test1<I<T2>>) /* primary */
val x: Test1<I<T2>>
field = x
get
}
class C<T : Any?> : I<T> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
annotation class Test4 : Annotation {
constructor(x: Test3<String, C<String>>) /* primary */
val x: Test3<String, C<String>>
field = x
get
}
class ARG {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
@Test1(x = 42)
@Test2(x = 38)
@Test3(x = Test1<I<I<Any?>>>(x = 39))
@Test4(x = Test3<String, C<String>>(x = Test1<I<C<String>>>(x = 40)))
class CC {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
FILE fqName:ann fileName:/genericAnnotationClasses.kt
CLASS ANNOTATION_CLASS name:Test1 modality:FINAL 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?]
CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:ann.Test1<T of ann.Test1> [primary]
VALUE_PARAMETER name:x index:0 type:kotlin.Int
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:FINAL 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]
TYPE_PARAMETER name:T2 index:1 variance: superTypes:[kotlin.Any?]
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
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?]
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:FINAL 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?]
TYPE_PARAMETER name:T2 index:1 variance: superTypes:[ann.I<T1 of ann.Test3>]
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>>
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?]
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:FINAL visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:ann.Test4
CONSTRUCTOR visibility:public <> (x:ann.Test3<kotlin.Int, ann.C<kotlin.Int>>) returnType:ann.Test4 [primary]
VALUE_PARAMETER name:x index:0 type:ann.Test3<kotlin.Int, ann.C<kotlin.Int>>
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:ann.Test3<kotlin.Int, ann.C<kotlin.Int>> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: ann.Test3<kotlin.Int, ann.C<kotlin.Int>> declared in ann.Test4.<init>' type=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: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> (): ann.Test3<kotlin.Int, ann.C<kotlin.Int>> declared in ann.Test4'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:ann.Test3<kotlin.Int, ann.C<kotlin.Int>> visibility:private [final]' type=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 CLASS name:CC modality:FINAL visibility:public superTypes:[kotlin.Any]
annotations:
Test1(x = '42')
Test2(x = '38')
Test3<kotlin.String, ann.C<kotlin.String>>(x = Test1<ann.I<ann.C<kotlin.String>>>(x = '39'))
Test4(x = Test3<kotlin.Int, kotlin.Int>(x = Test1<ann.I<ann.C<kotlin.Int>>>(x = '40')))
$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
// IGNORE_BACKEND_FIR: JVM_IR
package ann
annotation class Test1<T>(val x: Int)
annotation class Test2<T1 : Any, T2>(val x: Int = 0)
interface I<T>
annotation class Test3<T1, T2 : I<T1>>(val x: Test1<I<T2>>)
class C<T> : I<T>
annotation class Test4(val x: Array<Test3<Int, C<Int>>>)
class ARG
annotation class Test5<T>(vararg val xs: Test3<T, C<T>>)
@Test1<ARG>(42)
@Test2<String, String>(38)
@Test3<String, C<String>>(Test1(39))
@Test4([Test3(Test1(40)), Test3(Test1(50)), Test3(Test1(60))])
@Test5<ARG>(*arrayOf(Test3(Test1(70))), *arrayOf(Test3(Test1(80))))
class CC
\ No newline at end of file
package ann
annotation class Test1<T : Any?> : Annotation {
constructor(x: Int) /* primary */
val x: Int
field = x
get
}
annotation class Test2<T1 : Any, T2 : Any?> : Annotation {
constructor(x: Int = 0) /* primary */
val x: Int
field = x
get
}
interface I<T : Any?> {
}
annotation class Test3<T1 : Any?, T2 : I<T1>> : Annotation {
constructor(x: Test1<I<T2>>) /* primary */
val x: Test1<I<T2>>
field = x
get
}
class C<T : Any?> : I<T> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
annotation class Test4 : Annotation {
constructor(x: Array<Test3<Int, C<Int>>>) /* primary */
val x: Array<Test3<Int, C<Int>>>
field = x
get
}
class ARG {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
annotation class Test5<T : Any?> : Annotation {
constructor(vararg xs: Test3<T, C<T>>) /* primary */
val xs: Array<out Test3<T, C<T>>>
field = xs
get
}
@Test1<ARG>(x = 42)
@Test2<String, String>(x = 38)
@Test3<String, C<String>>(x = Test1<I<C<String>>>(x = 39))
@Test4(x = [Test3<Int, C<Int>>(x = Test1<I<C<Int>>>(x = 40)), Test3<Int, C<Int>>(x = Test1<I<C<Int>>>(x = 50)), Test3<Int, C<Int>>(x = Test1<I<C<Int>>>(x = 60))])
@Test5<ARG>(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>() */
}
}
FILE fqName:ann fileName:/genericAnnotationClasses.kt
CLASS ANNOTATION_CLASS name:Test1 modality:FINAL 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?]
CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:ann.Test1<T of ann.Test1> [primary]
VALUE_PARAMETER name:x index:0 type:kotlin.Int
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:FINAL 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]
TYPE_PARAMETER name:T2 index:1 variance: superTypes:[kotlin.Any?]
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
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?]
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:FINAL 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?]
TYPE_PARAMETER name:T2 index:1 variance: superTypes:[ann.I<T1 of ann.Test3>]
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>>
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?]
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:FINAL 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>>>
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:FINAL 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?]
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]
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<ann.ARG>(x = '42')
Test2<kotlin.String, kotlin.String>(x = '38')
Test3<kotlin.String, ann.C<kotlin.String>>(x = Test1<ann.I<ann.C<kotlin.String>>>(x = '39'))
Test4(x = [Test3<kotlin.Int, ann.C<kotlin.Int>>(x = Test1<ann.I<ann.C<kotlin.Int>>>(x = '40')), Test3<kotlin.Int, ann.C<kotlin.Int>>(x = Test1<ann.I<ann.C<kotlin.Int>>>(x = '50')), Test3<kotlin.Int, ann.C<kotlin.Int>>(x = Test1<ann.I<ann.C<kotlin.Int>>>(x = '60'))])
Test5<ann.ARG>(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
......@@ -575,6 +575,12 @@ public class IrTextTestGenerated extends AbstractIrTextTest {
runTest("compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt");
}
@Test
@TestMetadata("genericAnnotationClasses.kt")
public void testGenericAnnotationClasses() throws Exception {
runTest("compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt");
}
@Test
@TestMetadata("inheritingDeprecation.kt")
public void testInheritingDeprecation() throws Exception {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册