FIR: Fix interface delegation ABI
- Unifies the name of the `$$delegate_<n>` field between K1 and K2. - Make the `$$delegate_<n>` field private
This commit is contained in:
committed by
Space Team
parent
91749737f8
commit
a7ba081d22
@@ -115,7 +115,7 @@ FILE fqName:<root> fileName:/AnnotationLoader.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun visitArray (): <root>.Visitor? declared in <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>'
|
||||
CALL 'public open fun visitArray (): <root>.Visitor? declared in <root>.Visitor' type=<root>.Visitor? origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Visitor visibility:local [final]' type=<root>.Visitor origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Visitor visibility:private [final]' type=<root>.Visitor origin=null
|
||||
receiver: GET_VAR '<this>: <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided> declared in <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>.visitArray' type=<root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided> origin=null
|
||||
FUN DELEGATED_MEMBER name:visitAnnotation visibility:public modality:OPEN <> ($this:<root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>) returnType:<root>.Visitor?
|
||||
overridden:
|
||||
@@ -124,9 +124,9 @@ FILE fqName:<root> fileName:/AnnotationLoader.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun visitAnnotation (): <root>.Visitor? declared in <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>'
|
||||
CALL 'public open fun visitAnnotation (): <root>.Visitor? declared in <root>.Visitor' type=<root>.Visitor? origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Visitor visibility:local [final]' type=<root>.Visitor origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Visitor visibility:private [final]' type=<root>.Visitor origin=null
|
||||
receiver: GET_VAR '<this>: <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided> declared in <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>.visitAnnotation' type=<root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided> origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.Visitor visibility:local [final]
|
||||
FIELD DELEGATE name:$$delegate_0 type:<root>.Visitor visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'val visitor: <root>.Visitor [val] declared in <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation' type=<root>.Visitor origin=null
|
||||
FUN name:visit visibility:public modality:FINAL <> ($this:<root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>) returnType:kotlin.Unit
|
||||
|
||||
@@ -59,14 +59,14 @@ class AnnotationLoader {
|
||||
}
|
||||
|
||||
override fun visitArray(): Visitor? {
|
||||
return <this>.#<$$delegate_0>.visitArray()
|
||||
return <this>.#$$delegate_0.visitArray()
|
||||
}
|
||||
|
||||
override fun visitAnnotation(): Visitor? {
|
||||
return <this>.#<$$delegate_0>.visitAnnotation()
|
||||
return <this>.#$$delegate_0.visitAnnotation()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: Visitor = visitor
|
||||
private /* final field */ val $$delegate_0: Visitor = visitor
|
||||
override fun visit() {
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -15,7 +15,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun add (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean declared in <root>.Impl'
|
||||
CALL 'public abstract fun add (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in <root>.Foo.B' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.add' type=<root>.Impl origin=null
|
||||
element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in <root>.Impl.add' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
FUN DELEGATED_MEMBER name:addAll visibility:public modality:OPEN <> ($this:<root>.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean
|
||||
@@ -27,7 +27,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun addAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean declared in <root>.Impl'
|
||||
CALL 'public abstract fun addAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in <root>.Foo.B' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.addAll' type=<root>.Impl origin=null
|
||||
elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in <root>.Impl.addAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null
|
||||
FUN DELEGATED_MEMBER name:clear visibility:public modality:OPEN <> ($this:<root>.Impl) returnType:kotlin.Unit
|
||||
@@ -37,7 +37,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Impl
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun clear (): kotlin.Unit [fake_override] declared in <root>.Foo.B' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.clear' type=<root>.Impl origin=null
|
||||
FUN DELEGATED_MEMBER name:iterator visibility:public modality:OPEN <> ($this:<root>.Impl) returnType:kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [operator]
|
||||
overridden:
|
||||
@@ -47,7 +47,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun iterator (): kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [operator] declared in <root>.Impl'
|
||||
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [fake_override,operator] declared in <root>.Foo.B' type=kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.iterator' type=<root>.Impl origin=null
|
||||
FUN DELEGATED_MEMBER name:remove visibility:public modality:OPEN <> ($this:<root>.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean
|
||||
overridden:
|
||||
@@ -58,7 +58,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun remove (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean declared in <root>.Impl'
|
||||
CALL 'public abstract fun remove (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in <root>.Foo.B' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.remove' type=<root>.Impl origin=null
|
||||
element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in <root>.Impl.remove' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
FUN DELEGATED_MEMBER name:removeAll visibility:public modality:OPEN <> ($this:<root>.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean
|
||||
@@ -70,7 +70,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean declared in <root>.Impl'
|
||||
CALL 'public abstract fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in <root>.Foo.B' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.removeAll' type=<root>.Impl origin=null
|
||||
elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in <root>.Impl.removeAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null
|
||||
FUN DELEGATED_MEMBER name:retainAll visibility:public modality:OPEN <> ($this:<root>.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean
|
||||
@@ -82,7 +82,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean declared in <root>.Impl'
|
||||
CALL 'public abstract fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in <root>.Foo.B' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.retainAll' type=<root>.Impl origin=null
|
||||
elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in <root>.Impl.retainAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null
|
||||
FUN DELEGATED_MEMBER name:contains visibility:public modality:OPEN <> ($this:<root>.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean [operator]
|
||||
@@ -94,7 +94,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun contains (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [operator] declared in <root>.Impl'
|
||||
CALL 'public abstract fun contains (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override,operator] declared in <root>.Foo.B' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.contains' type=<root>.Impl origin=null
|
||||
element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in <root>.Impl.contains' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
FUN DELEGATED_MEMBER name:containsAll visibility:public modality:OPEN <> ($this:<root>.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean
|
||||
@@ -106,7 +106,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean declared in <root>.Impl'
|
||||
CALL 'public abstract fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in <root>.Foo.B' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.containsAll' type=<root>.Impl origin=null
|
||||
elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in <root>.Impl.containsAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null
|
||||
FUN DELEGATED_MEMBER name:isEmpty visibility:public modality:OPEN <> ($this:<root>.Impl) returnType:kotlin.Boolean
|
||||
@@ -117,7 +117,7 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun isEmpty (): kotlin.Boolean declared in <root>.Impl'
|
||||
CALL 'public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in <root>.Foo.B' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.isEmpty' type=<root>.Impl origin=null
|
||||
PROPERTY DELEGATED_MEMBER name:size visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
@@ -132,9 +132,9 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun <get-size> (): kotlin.Int declared in <root>.Impl'
|
||||
CALL 'public abstract fun <get-size> (): kotlin.Int [fake_override] declared in <root>.Foo.B' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]' type=<root>.Foo.B origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.<get-size>' type=<root>.Impl origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.Foo.B visibility:local [final]
|
||||
FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'b: <root>.Foo.B declared in <root>.Impl.<init>' type=<root>.Foo.B origin=null
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
|
||||
+12
-12
@@ -6,51 +6,51 @@ class Impl : A, B {
|
||||
}
|
||||
|
||||
override fun add(element: @FlexibleNullability String?): Boolean {
|
||||
return <this>.#<$$delegate_0>.add(element = element)
|
||||
return <this>.#$$delegate_0.add(element = element)
|
||||
}
|
||||
|
||||
override fun addAll(elements: Collection<@FlexibleNullability String?>): Boolean {
|
||||
return <this>.#<$$delegate_0>.addAll(elements = elements)
|
||||
return <this>.#$$delegate_0.addAll(elements = elements)
|
||||
}
|
||||
|
||||
override fun clear() {
|
||||
<this>.#<$$delegate_0>.clear()
|
||||
<this>.#$$delegate_0.clear()
|
||||
}
|
||||
|
||||
override operator fun iterator(): MutableIterator<@FlexibleNullability String?> {
|
||||
return <this>.#<$$delegate_0>.iterator()
|
||||
return <this>.#$$delegate_0.iterator()
|
||||
}
|
||||
|
||||
override fun remove(element: @FlexibleNullability String?): Boolean {
|
||||
return <this>.#<$$delegate_0>.remove(element = element)
|
||||
return <this>.#$$delegate_0.remove(element = element)
|
||||
}
|
||||
|
||||
override fun removeAll(elements: Collection<@FlexibleNullability String?>): Boolean {
|
||||
return <this>.#<$$delegate_0>.removeAll(elements = elements)
|
||||
return <this>.#$$delegate_0.removeAll(elements = elements)
|
||||
}
|
||||
|
||||
override fun retainAll(elements: Collection<@FlexibleNullability String?>): Boolean {
|
||||
return <this>.#<$$delegate_0>.retainAll(elements = elements)
|
||||
return <this>.#$$delegate_0.retainAll(elements = elements)
|
||||
}
|
||||
|
||||
override operator fun contains(element: @FlexibleNullability String?): Boolean {
|
||||
return <this>.#<$$delegate_0>.contains(element = element)
|
||||
return <this>.#$$delegate_0.contains(element = element)
|
||||
}
|
||||
|
||||
override fun containsAll(elements: Collection<@FlexibleNullability String?>): Boolean {
|
||||
return <this>.#<$$delegate_0>.containsAll(elements = elements)
|
||||
return <this>.#$$delegate_0.containsAll(elements = elements)
|
||||
}
|
||||
|
||||
override fun isEmpty(): Boolean {
|
||||
return <this>.#<$$delegate_0>.isEmpty()
|
||||
return <this>.#$$delegate_0.isEmpty()
|
||||
}
|
||||
|
||||
override val size: Int
|
||||
override get(): Int {
|
||||
return <this>.#<$$delegate_0>.<get-size>()
|
||||
return <this>.#$$delegate_0.<get-size>()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: B = b
|
||||
private /* final field */ val $$delegate_0: B = b
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user