[Test] Reproduce KT-64466

This commit is contained in:
Dmitriy Novozhilov
2024-01-11 13:31:44 +02:00
committed by Space Team
parent be728d4291
commit 50abaaff7e
16 changed files with 542 additions and 0 deletions
@@ -52,6 +52,12 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
@@ -52,6 +52,12 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest {
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
@@ -0,0 +1,127 @@
FILE fqName:<root> fileName:/annotationsOnDelegatedMembers.kt
CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Ann
CONSTRUCTOR visibility:public <> () returnType:<root>.Ann [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
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 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 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 declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Base
FUN name:func visibility:public modality:ABSTRACT <> ($this:<root>.Base) returnType:kotlin.Unit
annotations:
Ann
$this: VALUE_PARAMETER name:<this> type:<root>.Base
PROPERTY name:prop visibility:public modality:ABSTRACT [val]
annotations:
Ann
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-prop> visibility:public modality:ABSTRACT <> ($this:<root>.Base) returnType:kotlin.Int
correspondingProperty: PROPERTY name:prop visibility:public modality:ABSTRACT [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Base
PROPERTY name:propWithAccessors visibility:public modality:ABSTRACT [var]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-propWithAccessors> visibility:public modality:ABSTRACT <> ($this:<root>.Base) returnType:kotlin.Int
annotations:
Ann
correspondingProperty: PROPERTY name:propWithAccessors visibility:public modality:ABSTRACT [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Base
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-propWithAccessors> visibility:public modality:ABSTRACT <> ($this:<root>.Base, <set-?>:kotlin.Int) returnType:kotlin.Unit
annotations:
Ann
correspondingProperty: PROPERTY name:propWithAccessors visibility:public modality:ABSTRACT [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Base
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
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 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:Delegated modality:FINAL visibility:public superTypes:[<root>.Base]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegated
CONSTRUCTOR visibility:public <> (b:<root>.Base) returnType:<root>.Delegated [primary]
VALUE_PARAMETER name:b index:0 type:<root>.Base
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegated modality:FINAL visibility:public superTypes:[<root>.Base]'
FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]
EXPRESSION_BODY
GET_VAR 'b: <root>.Base declared in <root>.Delegated.<init>' type=<root>.Base origin=null
FUN DELEGATED_MEMBER name:func visibility:public modality:OPEN <> ($this:<root>.Delegated) returnType:kotlin.Unit
annotations:
Ann
overridden:
public abstract fun func (): kotlin.Unit declared in <root>.Base
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
BLOCK_BODY
CALL 'public abstract fun func (): kotlin.Unit declared in <root>.Base' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]' type=<root>.Base origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.func' type=<root>.Delegated origin=null
PROPERTY DELEGATED_MEMBER name:prop visibility:public modality:OPEN [val]
overridden:
public abstract prop: kotlin.Int
FUN DELEGATED_MEMBER name:<get-prop> visibility:public modality:OPEN <> ($this:<root>.Delegated) returnType:kotlin.Int
correspondingProperty: PROPERTY DELEGATED_MEMBER name:prop visibility:public modality:OPEN [val]
overridden:
public abstract fun <get-prop> (): kotlin.Int declared in <root>.Base
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-prop> (): kotlin.Int declared in <root>.Delegated'
CALL 'public abstract fun <get-prop> (): kotlin.Int declared in <root>.Base' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]' type=<root>.Base origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.<get-prop>' type=<root>.Delegated origin=null
PROPERTY DELEGATED_MEMBER name:propWithAccessors visibility:public modality:OPEN [var]
overridden:
public abstract propWithAccessors: kotlin.Int
FUN DELEGATED_MEMBER name:<get-propWithAccessors> visibility:public modality:OPEN <> ($this:<root>.Delegated) returnType:kotlin.Int
correspondingProperty: PROPERTY DELEGATED_MEMBER name:propWithAccessors visibility:public modality:OPEN [var]
overridden:
public abstract fun <get-propWithAccessors> (): kotlin.Int declared in <root>.Base
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-propWithAccessors> (): kotlin.Int declared in <root>.Delegated'
CALL 'public abstract fun <get-propWithAccessors> (): kotlin.Int declared in <root>.Base' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]' type=<root>.Base origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.<get-propWithAccessors>' type=<root>.Delegated origin=null
FUN DELEGATED_MEMBER name:<set-propWithAccessors> visibility:public modality:OPEN <> ($this:<root>.Delegated, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY DELEGATED_MEMBER name:propWithAccessors visibility:public modality:OPEN [var]
overridden:
public abstract fun <set-propWithAccessors> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Base
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public abstract fun <set-propWithAccessors> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Base' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]' type=<root>.Base origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.<set-propWithAccessors>' type=<root>.Delegated origin=null
<set-?>: GET_VAR '<set-?>: kotlin.Int declared in <root>.Delegated.<set-propWithAccessors>' type=kotlin.Int 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 declared in <root>.Base
$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 <root>.Base
$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 <root>.Base
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -0,0 +1,52 @@
open annotation class Ann : Annotation {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
interface Base {
@Ann
abstract fun func()
@Ann
abstract val prop: Int
abstract get
abstract var propWithAccessors: Int
@Ann
abstract get
@Ann
abstract set
}
class Delegated : Base {
constructor(b: Base) /* primary */ {
super/*Any*/()
/* <init>() */
}
private /* final field */ val $$delegate_0: Base = b
@Ann
override fun func() {
<this>.#$$delegate_0.func()
}
override val prop: Int
override get(): Int {
return <this>.#$$delegate_0.<get-prop>()
}
override var propWithAccessors: Int
override get(): Int {
return <this>.#$$delegate_0.<get-propWithAccessors>()
}
override set(<set-?>: Int) {
<this>.#$$delegate_0.<set-propWithAccessors>(<set-?> = <set-?>)
}
}
@@ -0,0 +1,131 @@
FILE fqName:<root> fileName:/annotationsOnDelegatedMembers.kt
CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Ann
CONSTRUCTOR visibility:public <> () returnType:<root>.Ann [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
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 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 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 declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Base
FUN name:func visibility:public modality:ABSTRACT <> ($this:<root>.Base) returnType:kotlin.Unit
annotations:
Ann
$this: VALUE_PARAMETER name:<this> type:<root>.Base
PROPERTY name:prop visibility:public modality:ABSTRACT [val]
annotations:
Ann
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-prop> visibility:public modality:ABSTRACT <> ($this:<root>.Base) returnType:kotlin.Int
correspondingProperty: PROPERTY name:prop visibility:public modality:ABSTRACT [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Base
PROPERTY name:propWithAccessors visibility:public modality:ABSTRACT [var]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-propWithAccessors> visibility:public modality:ABSTRACT <> ($this:<root>.Base) returnType:kotlin.Int
annotations:
Ann
correspondingProperty: PROPERTY name:propWithAccessors visibility:public modality:ABSTRACT [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Base
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-propWithAccessors> visibility:public modality:ABSTRACT <> ($this:<root>.Base, <set-?>:kotlin.Int) returnType:kotlin.Unit
annotations:
Ann
correspondingProperty: PROPERTY name:propWithAccessors visibility:public modality:ABSTRACT [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Base
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
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 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:Delegated modality:FINAL visibility:public superTypes:[<root>.Base]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegated
CONSTRUCTOR visibility:public <> (b:<root>.Base) returnType:<root>.Delegated [primary]
VALUE_PARAMETER name:b index:0 type:<root>.Base
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegated modality:FINAL visibility:public superTypes:[<root>.Base]'
FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]
EXPRESSION_BODY
GET_VAR 'b: <root>.Base declared in <root>.Delegated.<init>' type=<root>.Base origin=null
PROPERTY DELEGATED_MEMBER name:prop visibility:public modality:OPEN [val]
overridden:
public abstract prop: kotlin.Int
FUN DELEGATED_MEMBER name:<get-prop> visibility:public modality:OPEN <> ($this:<root>.Delegated) returnType:kotlin.Int
correspondingProperty: PROPERTY DELEGATED_MEMBER name:prop visibility:public modality:OPEN [val]
overridden:
public abstract fun <get-prop> (): kotlin.Int declared in <root>.Base
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-prop> (): kotlin.Int declared in <root>.Delegated'
CALL 'public abstract fun <get-prop> (): kotlin.Int declared in <root>.Base' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]' type=<root>.Base origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.<get-prop>' type=<root>.Delegated origin=null
PROPERTY DELEGATED_MEMBER name:propWithAccessors visibility:public modality:OPEN [var]
overridden:
public abstract propWithAccessors: kotlin.Int
FUN DELEGATED_MEMBER name:<get-propWithAccessors> visibility:public modality:OPEN <> ($this:<root>.Delegated) returnType:kotlin.Int
annotations:
Ann
correspondingProperty: PROPERTY DELEGATED_MEMBER name:propWithAccessors visibility:public modality:OPEN [var]
overridden:
public abstract fun <get-propWithAccessors> (): kotlin.Int declared in <root>.Base
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-propWithAccessors> (): kotlin.Int declared in <root>.Delegated'
CALL 'public abstract fun <get-propWithAccessors> (): kotlin.Int declared in <root>.Base' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]' type=<root>.Base origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.<get-propWithAccessors>' type=<root>.Delegated origin=null
FUN DELEGATED_MEMBER name:<set-propWithAccessors> visibility:public modality:OPEN <> ($this:<root>.Delegated, <set-?>:kotlin.Int) returnType:kotlin.Unit
annotations:
Ann
correspondingProperty: PROPERTY DELEGATED_MEMBER name:propWithAccessors visibility:public modality:OPEN [var]
overridden:
public abstract fun <set-propWithAccessors> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Base
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public abstract fun <set-propWithAccessors> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Base' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]' type=<root>.Base origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.<set-propWithAccessors>' type=<root>.Delegated origin=null
<set-?>: GET_VAR '<set-?>: kotlin.Int declared in <root>.Delegated.<set-propWithAccessors>' type=kotlin.Int origin=null
FUN DELEGATED_MEMBER name:func visibility:public modality:OPEN <> ($this:<root>.Delegated) returnType:kotlin.Unit
annotations:
Ann
overridden:
public abstract fun func (): kotlin.Unit declared in <root>.Base
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
BLOCK_BODY
CALL 'public abstract fun func (): kotlin.Unit declared in <root>.Base' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Base visibility:private [final]' type=<root>.Base origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.func' type=<root>.Delegated 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 declared in <root>.Base
$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 <root>.Base
$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 <root>.Base
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -0,0 +1,17 @@
// ISSUE: KT-64466
annotation class Ann
interface Base {
@Ann
fun func()
@Ann
val prop: Int
var propWithAccessors: Int
@Ann get
@Ann set
}
class Delegated(b: Base) : Base by b
@@ -0,0 +1,54 @@
open annotation class Ann : Annotation {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
interface Base {
@Ann
abstract fun func()
@Ann
abstract val prop: Int
abstract get
abstract var propWithAccessors: Int
@Ann
abstract get
@Ann
abstract set
}
class Delegated : Base {
constructor(b: Base) /* primary */ {
super/*Any*/()
/* <init>() */
}
private /* final field */ val $$delegate_0: Base = b
override val prop: Int
override get(): Int {
return <this>.#$$delegate_0.<get-prop>()
}
override var propWithAccessors: Int
@Ann
override get(): Int {
return <this>.#$$delegate_0.<get-propWithAccessors>()
}
@Ann
override set(<set-?>: Int) {
<this>.#$$delegate_0.<set-propWithAccessors>(<set-?> = <set-?>)
}
@Ann
override fun func() {
<this>.#$$delegate_0.func()
}
}
@@ -0,0 +1,102 @@
// CHECK:
// Mangled name: Ann
// Public signature: /Ann|null[0]
open annotation class Ann : Annotation {
// CHECK:
// Mangled name: Ann#<init>(){}
// Public signature: /Ann.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
constructor() /* primary */
}
// CHECK:
// Mangled name: Delegated
// Public signature: /Delegated|null[0]
class Delegated : Base {
// CHECK:
// Mangled name: Delegated#<init>(Base){}
// Public signature: /Delegated.<init>|8918428909696021993[0]
// Public signature debug description: <init>(Base){}
constructor(b: Base) /* primary */
// CHECK:
// Mangled name: Delegated#func(){}
// Public signature: /Delegated.func|1643338395720868039[0]
// Public signature debug description: func(){}
@Ann
override fun func(): Unit
// CHECK:
// Mangled name: Delegated{}prop
// Public signature: /Delegated.prop|3598315380056892812[0]
// Public signature debug description: {}prop
override val prop: Int
// CHECK JVM_IR:
// Mangled name: Delegated#<get-prop>(){}kotlin.Int
// Public signature: /Delegated.prop.<get-prop>|-2094203252476742575[0]
// Public signature debug description: <get-prop>(){}kotlin.Int
override get(): Int
// CHECK:
// Mangled name: Delegated{}propWithAccessors
// Public signature: /Delegated.propWithAccessors|6816664192388941498[0]
// Public signature debug description: {}propWithAccessors
override var propWithAccessors: Int
// CHECK JVM_IR:
// Mangled name: Delegated#<get-propWithAccessors>(){}kotlin.Int
// Public signature: /Delegated.propWithAccessors.<get-propWithAccessors>|1392907778891534138[0]
// Public signature debug description: <get-propWithAccessors>(){}kotlin.Int
@Ann
override get(): Int
// CHECK:
// Mangled name: Delegated#<set-propWithAccessors>(kotlin.Int){}
// Public signature: /Delegated.propWithAccessors.<set-propWithAccessors>|-5089950791342520697[0]
// Public signature debug description: <set-propWithAccessors>(kotlin.Int){}
@Ann
override set(<set-?>: Int): Unit
}
// CHECK:
// Mangled name: Base
// Public signature: /Base|null[0]
interface Base {
// CHECK:
// Mangled name: Base#func(){}
// Public signature: /Base.func|1643338395720868039[0]
// Public signature debug description: func(){}
@Ann
abstract fun func(): Unit
// CHECK:
// Mangled name: Base{}prop
// Public signature: /Base.prop|3598315380056892812[0]
// Public signature debug description: {}prop
@Ann
abstract val prop: Int
// CHECK JVM_IR:
// Mangled name: Base#<get-prop>(){}kotlin.Int
// Public signature: /Base.prop.<get-prop>|-2094203252476742575[0]
// Public signature debug description: <get-prop>(){}kotlin.Int
abstract get
// CHECK:
// Mangled name: Base{}propWithAccessors
// Public signature: /Base.propWithAccessors|6816664192388941498[0]
// Public signature debug description: {}propWithAccessors
abstract var propWithAccessors: Int
// CHECK JVM_IR:
// Mangled name: Base#<get-propWithAccessors>(){}kotlin.Int
// Public signature: /Base.propWithAccessors.<get-propWithAccessors>|1392907778891534138[0]
// Public signature debug description: <get-propWithAccessors>(){}kotlin.Int
@Ann
abstract get
// CHECK:
// Mangled name: Base#<set-propWithAccessors>(kotlin.Int){}
// Public signature: /Base.propWithAccessors.<set-propWithAccessors>|-5089950791342520697[0]
// Public signature debug description: <set-propWithAccessors>(kotlin.Int){}
@Ann
abstract set
}
@@ -52,6 +52,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
@@ -57,6 +57,11 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase {
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
runTest("compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.kt");
@@ -52,6 +52,12 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
@@ -52,6 +52,12 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest {
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
@@ -52,6 +52,12 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest {
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
@@ -52,6 +52,12 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
@@ -52,6 +52,12 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {
@@ -52,6 +52,12 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT
runTest("compiler/testData/ir/irText/classes/annotationClasses.kt");
}
@Test
@TestMetadata("annotationsOnDelegatedMembers.kt")
public void testAnnotationsOnDelegatedMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/annotationsOnDelegatedMembers.kt");
}
@Test
@TestMetadata("argumentReorderingInDelegatingConstructorCall.kt")
public void testArgumentReorderingInDelegatingConstructorCall() throws Exception {