PSI2IR don't copy annotations for properties implemented by delegation
KT-43012
This commit is contained in:
+5
@@ -401,6 +401,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
runTest("compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("annotationsOnDelegatedMembers.kt")
|
||||
public void testAnnotationsOnDelegatedMembers() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("annotationsWithDefaultParameterValues.kt")
|
||||
public void testAnnotationsWithDefaultParameterValues() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt");
|
||||
|
||||
+6
-1
@@ -30,12 +30,17 @@ class AnnotationGenerator(context: GeneratorContext) : IrElementVisitorVoid {
|
||||
}
|
||||
|
||||
private fun generateAnnotationsForDeclaration(declaration: IrDeclaration) {
|
||||
// For interface functions implemented by delegation,
|
||||
// front-end (incorrectly) copies annotations from corresponding interface members.
|
||||
if (declaration is IrProperty && declaration.origin == IrDeclarationOrigin.DELEGATED_MEMBER) return
|
||||
|
||||
// Delegate field is mapped to a new property descriptor with annotations of the original property delegate
|
||||
// (see IrPropertyDelegateDescriptorImpl), but annotations on backing fields should be processed manually here
|
||||
val annotatedDescriptor =
|
||||
if (declaration is IrField && declaration.origin != IrDeclarationOrigin.PROPERTY_DELEGATE)
|
||||
declaration.descriptor.backingField
|
||||
else declaration.descriptor
|
||||
else
|
||||
declaration.descriptor
|
||||
|
||||
if (annotatedDescriptor != null) {
|
||||
declaration.annotations += annotatedDescriptor.annotations.mapNotNull {
|
||||
|
||||
@@ -75,7 +75,7 @@ class ClassGenerator(
|
||||
|
||||
fun <T : DeclarationDescriptor> List<T>.sortedByRenderer(): List<T> {
|
||||
val rendered = map(DESCRIPTOR_RENDERER::render)
|
||||
val sortedIndices = (0 until size).sortedWith(Comparator { i, j -> rendered[i].compareTo(rendered[j]) })
|
||||
val sortedIndices = (0 until size).sortedWith { i, j -> rendered[i].compareTo(rendered[j]) }
|
||||
return sortedIndices.map { this[it] }
|
||||
}
|
||||
}
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
annotation class Ann
|
||||
|
||||
interface IFoo {
|
||||
@Ann val testVal: String
|
||||
@Ann fun testFun()
|
||||
@Ann val String.testExtVal: String
|
||||
@Ann fun String.testExtFun()
|
||||
}
|
||||
|
||||
class DFoo(d: IFoo) : IFoo by d
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class Ann {
|
||||
// source: 'annotationsOnDelegatedMembers.kt'
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class DFoo {
|
||||
// source: 'annotationsOnDelegatedMembers.kt'
|
||||
private synthetic final field $$delegate_0: IFoo
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: IFoo): void
|
||||
public @org.jetbrains.annotations.NotNull method getTestExtVal(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
|
||||
public @org.jetbrains.annotations.NotNull method getTestVal(): java.lang.String
|
||||
public @Ann method testExtFun(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
public @Ann method testFun(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class IFoo$DefaultImpls {
|
||||
// source: 'annotationsOnDelegatedMembers.kt'
|
||||
public synthetic deprecated static @Ann method getTestExtVal$annotations(p0: java.lang.String): void
|
||||
public synthetic deprecated static @Ann method getTestVal$annotations(): void
|
||||
public final inner class IFoo$DefaultImpls
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface IFoo {
|
||||
// source: 'annotationsOnDelegatedMembers.kt'
|
||||
public abstract @org.jetbrains.annotations.NotNull method getTestExtVal(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
|
||||
public abstract @org.jetbrains.annotations.NotNull method getTestVal(): java.lang.String
|
||||
public abstract @Ann method testExtFun(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
public abstract @Ann method testFun(): void
|
||||
public final inner class IFoo$DefaultImpls
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
FILE fqName:<root> fileName:/annotationsOnDelegatedMembers.kt
|
||||
CLASS ANNOTATION_CLASS name:Ann modality:FINAL visibility:public superTypes:[kotlin.Annotation]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Ann
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Ann [primary]
|
||||
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 INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IFoo
|
||||
PROPERTY name:testVal visibility:public modality:ABSTRACT [val]
|
||||
annotations:
|
||||
Ann
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testVal> visibility:public modality:ABSTRACT <> ($this:<root>.IFoo) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:testVal visibility:public modality:ABSTRACT [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
|
||||
FUN name:testFun visibility:public modality:ABSTRACT <> ($this:<root>.IFoo) returnType:kotlin.Unit
|
||||
annotations:
|
||||
Ann
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
|
||||
PROPERTY name:testExtVal visibility:public modality:ABSTRACT [val]
|
||||
annotations:
|
||||
Ann
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testExtVal> visibility:public modality:ABSTRACT <> ($this:<root>.IFoo, $receiver:kotlin.String) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:testExtVal visibility:public modality:ABSTRACT [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
|
||||
FUN name:testExtFun visibility:public modality:ABSTRACT <> ($this:<root>.IFoo, $receiver:kotlin.String) returnType:kotlin.Unit
|
||||
annotations:
|
||||
Ann
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
|
||||
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:DFoo modality:FINAL visibility:public superTypes:[<root>.IFoo]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DFoo
|
||||
CONSTRUCTOR visibility:public <> (d:<root>.IFoo) returnType:<root>.DFoo [primary]
|
||||
VALUE_PARAMETER name:d index:0 type:<root>.IFoo
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DFoo modality:FINAL visibility:public superTypes:[<root>.IFoo]'
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo' type=<root>.DFoo origin=null
|
||||
value: GET_VAR 'd: <root>.IFoo declared in <root>.DFoo.<init>' type=<root>.IFoo origin=null
|
||||
FUN DELEGATED_MEMBER name:testFun visibility:public modality:OPEN <> ($this:<root>.DFoo) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun testFun (): kotlin.Unit declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DFoo
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun testFun (): kotlin.Unit declared in <root>.IFoo' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.testFun' type=<root>.DFoo origin=null
|
||||
FUN DELEGATED_MEMBER name:testExtFun visibility:public modality:OPEN <> ($this:<root>.DFoo, $receiver:kotlin.String) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun testExtFun (): kotlin.Unit declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DFoo
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun testExtFun (): kotlin.Unit declared in <root>.IFoo' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.testExtFun' type=<root>.DFoo origin=null
|
||||
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.DFoo.testExtFun' type=kotlin.String origin=null
|
||||
PROPERTY DELEGATED_MEMBER name:testVal visibility:public modality:OPEN [val]
|
||||
FUN DELEGATED_MEMBER name:<get-testVal> visibility:public modality:OPEN <> ($this:<root>.DFoo) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY DELEGATED_MEMBER name:testVal visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
public abstract fun <get-testVal> (): kotlin.String declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DFoo
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun <get-testVal> (): kotlin.String declared in <root>.DFoo'
|
||||
CALL 'public abstract fun <get-testVal> (): kotlin.String declared in <root>.IFoo' type=kotlin.String origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.<get-testVal>' type=<root>.DFoo origin=null
|
||||
PROPERTY DELEGATED_MEMBER name:testExtVal visibility:public modality:OPEN [val]
|
||||
FUN DELEGATED_MEMBER name:<get-testExtVal> visibility:public modality:OPEN <> ($this:<root>.DFoo, $receiver:kotlin.String) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY DELEGATED_MEMBER name:testExtVal visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
public abstract fun <get-testExtVal> (): kotlin.String declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DFoo
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun <get-testExtVal> (): kotlin.String declared in <root>.DFoo'
|
||||
CALL 'public abstract fun <get-testExtVal> (): kotlin.String declared in <root>.IFoo' type=kotlin.String origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.<get-testExtVal>' type=<root>.DFoo origin=null
|
||||
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.DFoo.<get-testExtVal>' type=kotlin.String origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]
|
||||
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
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
annotation class Ann
|
||||
|
||||
interface IFoo {
|
||||
@Ann val testVal: String
|
||||
@Ann fun testFun()
|
||||
@Ann val String.testExtVal: String
|
||||
@Ann fun String.testExtFun()
|
||||
}
|
||||
|
||||
class DFoo(d: IFoo) : IFoo by d
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
FILE fqName:<root> fileName:/annotationsOnDelegatedMembers.kt
|
||||
CLASS ANNOTATION_CLASS name:Ann modality:FINAL visibility:public superTypes:[kotlin.Annotation]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Ann
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Ann [primary]
|
||||
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:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IFoo
|
||||
PROPERTY name:testVal visibility:public modality:ABSTRACT [val]
|
||||
annotations:
|
||||
Ann
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testVal> visibility:public modality:ABSTRACT <> ($this:<root>.IFoo) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:testVal visibility:public modality:ABSTRACT [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
|
||||
FUN name:testFun visibility:public modality:ABSTRACT <> ($this:<root>.IFoo) returnType:kotlin.Unit
|
||||
annotations:
|
||||
Ann
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
|
||||
PROPERTY name:testExtVal visibility:public modality:ABSTRACT [val]
|
||||
annotations:
|
||||
Ann
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testExtVal> visibility:public modality:ABSTRACT <> ($this:<root>.IFoo, $receiver:kotlin.String) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:testExtVal visibility:public modality:ABSTRACT [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
|
||||
FUN name:testExtFun visibility:public modality:ABSTRACT <> ($this:<root>.IFoo, $receiver:kotlin.String) returnType:kotlin.Unit
|
||||
annotations:
|
||||
Ann
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
|
||||
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:DFoo modality:FINAL visibility:public superTypes:[<root>.IFoo]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DFoo
|
||||
CONSTRUCTOR visibility:public <> (d:<root>.IFoo) returnType:<root>.DFoo [primary]
|
||||
VALUE_PARAMETER name:d index:0 type:<root>.IFoo
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DFoo modality:FINAL visibility:public superTypes:[<root>.IFoo]'
|
||||
FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'd: <root>.IFoo declared in <root>.DFoo.<init>' type=<root>.IFoo origin=null
|
||||
FUN DELEGATED_MEMBER name:testExtFun visibility:public modality:OPEN <> ($this:<root>.DFoo, $receiver:kotlin.String) returnType:kotlin.Unit
|
||||
annotations:
|
||||
Ann
|
||||
overridden:
|
||||
public abstract fun testExtFun (): kotlin.Unit declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DFoo
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun testExtFun (): kotlin.Unit declared in <root>.IFoo' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.testExtFun' type=<root>.DFoo origin=null
|
||||
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.DFoo.testExtFun' type=kotlin.String origin=null
|
||||
FUN DELEGATED_MEMBER name:testFun visibility:public modality:OPEN <> ($this:<root>.DFoo) returnType:kotlin.Unit
|
||||
annotations:
|
||||
Ann
|
||||
overridden:
|
||||
public abstract fun testFun (): kotlin.Unit declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DFoo
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun testFun (): kotlin.Unit declared in <root>.IFoo' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.testFun' type=<root>.DFoo origin=null
|
||||
PROPERTY DELEGATED_MEMBER name:testExtVal visibility:public modality:OPEN [val]
|
||||
FUN DELEGATED_MEMBER name:<get-testExtVal> visibility:public modality:OPEN <> ($this:<root>.DFoo, $receiver:kotlin.String) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY DELEGATED_MEMBER name:testExtVal visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
public abstract fun <get-testExtVal> (): kotlin.String declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DFoo
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun <get-testExtVal> (): kotlin.String declared in <root>.DFoo'
|
||||
CALL 'public abstract fun <get-testExtVal> (): kotlin.String declared in <root>.IFoo' type=kotlin.String origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.<get-testExtVal>' type=<root>.DFoo origin=null
|
||||
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.DFoo.<get-testExtVal>' type=kotlin.String origin=null
|
||||
PROPERTY DELEGATED_MEMBER name:testVal visibility:public modality:OPEN [val]
|
||||
FUN DELEGATED_MEMBER name:<get-testVal> visibility:public modality:OPEN <> ($this:<root>.DFoo) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY DELEGATED_MEMBER name:testVal visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
public abstract fun <get-testVal> (): kotlin.String declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DFoo
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun <get-testVal> (): kotlin.String declared in <root>.DFoo'
|
||||
CALL 'public abstract fun <get-testVal> (): kotlin.String declared in <root>.IFoo' type=kotlin.String origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.<get-testVal>' type=<root>.DFoo 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 <root>.IFoo
|
||||
$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 <root>.IFoo
|
||||
$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 <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
+5
@@ -171,6 +171,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/annotations"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationsOnDelegatedMembers.kt")
|
||||
public void testAnnotationsOnDelegatedMembers() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/annotationsOnDelegatedMembers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultTargets.kt")
|
||||
public void testDefaultTargets() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt");
|
||||
|
||||
+5
@@ -171,6 +171,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationsOnDelegatedMembers.kt")
|
||||
public void testAnnotationsOnDelegatedMembers() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/annotationsOnDelegatedMembers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultTargets.kt")
|
||||
public void testDefaultTargets() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt");
|
||||
|
||||
@@ -400,6 +400,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
runTest("compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("annotationsOnDelegatedMembers.kt")
|
||||
public void testAnnotationsOnDelegatedMembers() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("annotationsWithDefaultParameterValues.kt")
|
||||
public void testAnnotationsWithDefaultParameterValues() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt");
|
||||
|
||||
Reference in New Issue
Block a user