FIR: introduce delegate field initializers
Before this commit we initialized delegate fields in primary constructor, that could provoke NPE in case delegate is used in initializer of some property backing field. Now we initialize delegate fields directly instead.
This commit is contained in:
+6
-9
@@ -14,7 +14,6 @@ class Test1<E : Any?> : IBase<E> {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = i
|
||||
}
|
||||
|
||||
override fun <B : Any?> foo(a: E, b: B) {
|
||||
@@ -34,7 +33,7 @@ class Test1<E : Any?> : IBase<E> {
|
||||
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IBase<E>
|
||||
local /* final field */ val <$$delegate_0>: IBase<E> = i
|
||||
|
||||
}
|
||||
|
||||
@@ -43,14 +42,8 @@ class Test2 : IBase<String> {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = j
|
||||
}
|
||||
|
||||
var j: IBase<String>
|
||||
field = j
|
||||
get
|
||||
set
|
||||
|
||||
override fun <B : Any?> foo(a: String, b: B) {
|
||||
<this>.#<$$delegate_0>.foo</* null */>(a = a, b = b)
|
||||
}
|
||||
@@ -68,7 +61,11 @@ class Test2 : IBase<String> {
|
||||
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IBase<String>
|
||||
local /* final field */ val <$$delegate_0>: IBase<String> = j
|
||||
var j: IBase<String>
|
||||
field = j
|
||||
get
|
||||
set
|
||||
|
||||
}
|
||||
|
||||
|
||||
+23
-25
@@ -46,9 +46,6 @@ FILE fqName:<root> fileName:/delegatedGenericImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[<root>.IBase<E of <root>.Test1>]'
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase<E of <root>.Test1> visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.Test1<E of <root>.Test1> declared in <root>.Test1' type=<root>.Test1<E of <root>.Test1> origin=null
|
||||
value: GET_VAR 'i: <root>.IBase<E of <root>.Test1> declared in <root>.Test1.<init>' type=<root>.IBase<E of <root>.Test1> origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <B> ($this:<root>.Test1<E of <root>.Test1>, a:E of <root>.Test1, b:B of <root>.Test1.foo) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun foo <B> (a: A of <root>.IBase, b: B of <root>.IBase.foo): kotlin.Unit declared in <root>.IBase
|
||||
@@ -109,6 +106,8 @@ FILE fqName:<root> fileName:/delegatedGenericImplementation.kt
|
||||
$receiver: GET_VAR '<this>: kotlin.collections.List<D of <root>.Test1.<get-x>> declared in <root>.Test1.<set-x>' type=kotlin.collections.List<D of <root>.Test1.<get-x>> origin=null
|
||||
<set-?>: GET_VAR '<set-?>: D of <root>.Test1.<set-x>? declared in <root>.Test1.<set-x>' type=D of <root>.Test1.<set-x>? origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase<E of <root>.Test1> visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'i: <root>.IBase<E of <root>.Test1> declared in <root>.Test1.<init>' type=<root>.IBase<E of <root>.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 [operator] declared in kotlin.Any
|
||||
@@ -129,28 +128,6 @@ FILE fqName:<root> fileName:/delegatedGenericImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[<root>.IBase<kotlin.String>]'
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase<kotlin.String> visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2' type=<root>.Test2 origin=null
|
||||
value: GET_VAR 'j: <root>.IBase<kotlin.String> declared in <root>.Test2.<init>' type=<root>.IBase<kotlin.String> origin=null
|
||||
PROPERTY name:j visibility:public modality:FINAL [var]
|
||||
FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'j: <root>.IBase<kotlin.String> declared in <root>.Test2.<init>' type=<root>.IBase<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-j> visibility:public modality:FINAL <> ($this:<root>.Test2) returnType:<root>.IBase<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:j visibility:public modality:FINAL [var]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-j> (): <root>.IBase<kotlin.String> declared in <root>.Test2'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private' type=<root>.IBase<kotlin.String> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-j>' type=<root>.Test2 origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-j> visibility:public modality:FINAL <> ($this:<root>.Test2, <set-?>:<root>.IBase<kotlin.String>) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:j visibility:public modality:FINAL [var]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:<root>.IBase<kotlin.String>
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<set-j>' type=<root>.Test2 origin=null
|
||||
value: GET_VAR '<set-?>: <root>.IBase<kotlin.String> declared in <root>.Test2.<set-j>' type=<root>.IBase<kotlin.String> origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <B> ($this:<root>.Test2, a:kotlin.String, b:B of <root>.Test2.foo) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun foo <B> (a: A of <root>.IBase, b: B of <root>.IBase.foo): kotlin.Unit declared in <root>.IBase
|
||||
@@ -211,6 +188,27 @@ FILE fqName:<root> fileName:/delegatedGenericImplementation.kt
|
||||
$receiver: GET_VAR '<this>: kotlin.collections.List<D of <root>.Test2.<get-x>> declared in <root>.Test2.<set-x>' type=kotlin.collections.List<D of <root>.Test2.<get-x>> origin=null
|
||||
<set-?>: GET_VAR '<set-?>: D of <root>.Test2.<set-x>? declared in <root>.Test2.<set-x>' type=D of <root>.Test2.<set-x>? origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase<kotlin.String> visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'j: <root>.IBase<kotlin.String> declared in <root>.Test2.<init>' type=<root>.IBase<kotlin.String> origin=null
|
||||
PROPERTY name:j visibility:public modality:FINAL [var]
|
||||
FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'j: <root>.IBase<kotlin.String> declared in <root>.Test2.<init>' type=<root>.IBase<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-j> visibility:public modality:FINAL <> ($this:<root>.Test2) returnType:<root>.IBase<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:j visibility:public modality:FINAL [var]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-j> (): <root>.IBase<kotlin.String> declared in <root>.Test2'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private' type=<root>.IBase<kotlin.String> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-j>' type=<root>.Test2 origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-j> visibility:public modality:FINAL <> ($this:<root>.Test2, <set-?>:<root>.IBase<kotlin.String>) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:j visibility:public modality:FINAL [var]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:<root>.IBase<kotlin.String>
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<set-j>' type=<root>.Test2 origin=null
|
||||
value: GET_VAR '<set-?>: <root>.IBase<kotlin.String> declared in <root>.Test2.<set-j>' type=<root>.IBase<kotlin.String> 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 [operator] declared in kotlin.Any
|
||||
|
||||
@@ -82,7 +82,6 @@ class Test1 : IBase {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = BaseImpl
|
||||
}
|
||||
|
||||
override fun foo(x: Int, s: String) {
|
||||
@@ -97,7 +96,7 @@ class Test1 : IBase {
|
||||
(<this>.#<$$delegate_0>, <this>).qux()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IBase
|
||||
local /* final field */ val <$$delegate_0>: IBase = BaseImpl
|
||||
|
||||
}
|
||||
|
||||
@@ -106,8 +105,6 @@ class Test2 : IBase, IOther {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = BaseImpl
|
||||
<this>.#<$$delegate_1> = otherImpl(x0 = "", y0 = 42)
|
||||
}
|
||||
|
||||
override fun foo(x: Int, s: String) {
|
||||
@@ -122,7 +119,7 @@ class Test2 : IBase, IOther {
|
||||
(<this>.#<$$delegate_0>, <this>).qux()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IBase
|
||||
local /* final field */ val <$$delegate_0>: IBase = BaseImpl
|
||||
override val x: String
|
||||
override get(): String {
|
||||
return <this>.#<$$delegate_1>.<get-x>()
|
||||
@@ -149,7 +146,7 @@ class Test2 : IBase, IOther {
|
||||
(<this>.#<$$delegate_1>, <this>).<set-z2>(<set-?> = <set-?>)
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_1>: IOther
|
||||
local /* final field */ val <$$delegate_1>: IOther = otherImpl(x0 = "", y0 = 42)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -200,9 +200,6 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[<root>.IBase]'
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1' type=<root>.Test1 origin=null
|
||||
value: GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[<root>.IBase]' type=<root>.BaseImpl
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.Test1, x:kotlin.Int, s:kotlin.String) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun foo (x: kotlin.Int, s: kotlin.String): kotlin.Unit declared in <root>.IBase
|
||||
@@ -235,6 +232,8 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
|
||||
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.qux' type=<root>.Test1 origin=null
|
||||
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.Test1.qux' type=kotlin.String origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[<root>.IBase]' type=<root>.BaseImpl
|
||||
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
|
||||
@@ -254,14 +253,6 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[<root>.IBase; <root>.IOther]'
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2' type=<root>.Test2 origin=null
|
||||
value: GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[<root>.IBase]' type=<root>.BaseImpl
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.IOther visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2' type=<root>.Test2 origin=null
|
||||
value: CALL 'public final fun otherImpl (x0: kotlin.String, y0: kotlin.Int): <root>.IOther declared in <root>' type=<root>.IOther origin=null
|
||||
x0: CONST String type=kotlin.String value=""
|
||||
y0: CONST Int type=kotlin.Int value=42
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.Test2, x:kotlin.Int, s:kotlin.String) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun foo (x: kotlin.Int, s: kotlin.String): kotlin.Unit declared in <root>.IBase
|
||||
@@ -294,6 +285,8 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
|
||||
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.qux' type=<root>.Test2 origin=null
|
||||
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.Test2.qux' type=kotlin.String origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IBase visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[<root>.IBase]' type=<root>.BaseImpl
|
||||
PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [val]
|
||||
FUN DELEGATED_MEMBER name:<get-x> visibility:public modality:OPEN <> ($this:<root>.Test2) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [val]
|
||||
@@ -367,6 +360,10 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
|
||||
$receiver: GET_VAR '<this>: kotlin.Byte declared in <root>.Test2.<set-z2>' type=kotlin.Byte origin=null
|
||||
<set-?>: GET_VAR '<set-?>: kotlin.Int declared in <root>.Test2.<set-z2>' type=kotlin.Int origin=null
|
||||
FIELD DELEGATE name:<$$delegate_1> type:<root>.IOther visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun otherImpl (x0: kotlin.String, y0: kotlin.Int): <root>.IOther declared in <root>' type=<root>.IOther origin=null
|
||||
x0: CONST String type=kotlin.String value=""
|
||||
y0: CONST Int type=kotlin.Int value=42
|
||||
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
|
||||
|
||||
+4
-6
@@ -3,13 +3,8 @@ class Test : J {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = j
|
||||
}
|
||||
|
||||
private val j: J
|
||||
field = j
|
||||
private get
|
||||
|
||||
override fun takeNotNull(x: @EnhancedNullability String) {
|
||||
<this>.#<$$delegate_0>.takeNotNull(x = x)
|
||||
}
|
||||
@@ -36,7 +31,10 @@ class Test : J {
|
||||
return <this>.#<$$delegate_0>.returnsFlexible()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: J
|
||||
local /* final field */ val <$$delegate_0>: J = j
|
||||
private val j: J
|
||||
field = j
|
||||
private get
|
||||
|
||||
}
|
||||
|
||||
|
||||
+13
-14
@@ -6,20 +6,6 @@ FILE fqName:<root> fileName:/delegatedImplementationOfJavaInterface.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[<root>.J]'
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test' type=<root>.Test origin=null
|
||||
value: GET_VAR 'j: <root>.J declared in <root>.Test.<init>' type=<root>.J origin=null
|
||||
PROPERTY name:j visibility:private modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'j: <root>.J declared in <root>.Test.<init>' type=<root>.J origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-j> visibility:private modality:FINAL <> ($this:<root>.Test) returnType:<root>.J
|
||||
correspondingProperty: PROPERTY name:j visibility:private modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun <get-j> (): <root>.J declared in <root>.Test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.<get-j>' type=<root>.Test origin=null
|
||||
FUN DELEGATED_MEMBER name:takeNotNull visibility:public modality:OPEN <> ($this:<root>.Test, x:@[EnhancedNullability] kotlin.String) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun takeNotNull (x: @[EnhancedNullability] kotlin.String): kotlin.Unit declared in <root>.J
|
||||
@@ -82,6 +68,19 @@ FILE fqName:<root> fileName:/delegatedImplementationOfJavaInterface.kt
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.returnsFlexible' type=<root>.Test origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'j: <root>.J declared in <root>.Test.<init>' type=<root>.J origin=null
|
||||
PROPERTY name:j visibility:private modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'j: <root>.J declared in <root>.Test.<init>' type=<root>.J origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-j> visibility:private modality:FINAL <> ($this:<root>.Test) returnType:<root>.J
|
||||
correspondingProperty: PROPERTY name:j visibility:private modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun <get-j> (): <root>.J declared in <root>.Test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.<get-j>' type=<root>.Test 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 [operator] declared in kotlin.Any
|
||||
|
||||
+3
-5
@@ -24,17 +24,15 @@ class C : IFooBar {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = FooBarImpl
|
||||
}
|
||||
|
||||
override fun bar() {
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
<this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IFooBar
|
||||
local /* final field */ val <$$delegate_0>: IFooBar = FooBarImpl
|
||||
override fun bar() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+7
-8
@@ -53,14 +53,6 @@ FILE fqName:<root> fileName:/delegatedImplementationWithExplicitOverride.kt
|
||||
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:[<root>.IFooBar]'
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFooBar visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
value: GET_OBJECT 'CLASS OBJECT name:FooBarImpl modality:FINAL visibility:public superTypes:[<root>.IFooBar]' type=<root>.FooBarImpl
|
||||
FUN name:bar visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun bar (): kotlin.Unit declared in <root>.IFooBar
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun foo (): kotlin.Unit declared in <root>.IFooBar
|
||||
@@ -70,6 +62,13 @@ FILE fqName:<root> fileName:/delegatedImplementationWithExplicitOverride.kt
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFooBar visibility:local [final]' type=<root>.IFooBar origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.foo' type=<root>.C origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IFooBar visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
GET_OBJECT 'CLASS OBJECT name:FooBarImpl modality:FINAL visibility:public superTypes:[<root>.IFooBar]' type=<root>.FooBarImpl
|
||||
FUN name:bar visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun bar (): kotlin.Unit declared in <root>.IFooBar
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
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
|
||||
|
||||
+5
-10
@@ -52,14 +52,13 @@ class TestJFoo : IFoo {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = JFoo()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IFoo
|
||||
local /* final field */ val <$$delegate_0>: IFoo = JFoo()
|
||||
|
||||
}
|
||||
|
||||
@@ -68,14 +67,13 @@ class TestK1 : IFoo {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = K1()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IFoo
|
||||
local /* final field */ val <$$delegate_0>: IFoo = K1()
|
||||
|
||||
}
|
||||
|
||||
@@ -84,14 +82,13 @@ class TestK2 : IFoo {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = K2()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IFoo
|
||||
local /* final field */ val <$$delegate_0>: IFoo = K2()
|
||||
|
||||
}
|
||||
|
||||
@@ -100,14 +97,13 @@ class TestK3 : IFoo {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = K3()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IFoo
|
||||
local /* final field */ val <$$delegate_0>: IFoo = K3()
|
||||
|
||||
}
|
||||
|
||||
@@ -116,14 +112,13 @@ class TestK4 : IFoo {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = K4()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /* final field */ val <$$delegate_0>: IFoo
|
||||
local /* final field */ val <$$delegate_0>: IFoo = K4()
|
||||
|
||||
}
|
||||
|
||||
|
||||
+10
-15
@@ -124,9 +124,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestJFoo 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>.TestJFoo declared in <root>.TestJFoo' type=<root>.TestJFoo origin=null
|
||||
value: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JFoo' type=<root>.JFoo origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestJFoo) returnType:kotlin.String
|
||||
overridden:
|
||||
public abstract fun foo (): kotlin.String declared in <root>.IFoo
|
||||
@@ -137,6 +134,8 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.TestJFoo declared in <root>.TestJFoo.foo' type=<root>.TestJFoo origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JFoo' type=<root>.JFoo 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 [operator] declared in kotlin.Any
|
||||
@@ -156,9 +155,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK1 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>.TestK1 declared in <root>.TestK1' type=<root>.TestK1 origin=null
|
||||
value: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K1' type=<root>.K1 origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestK1) returnType:kotlin.String
|
||||
overridden:
|
||||
public abstract fun foo (): kotlin.String declared in <root>.IFoo
|
||||
@@ -169,6 +165,8 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.TestK1 declared in <root>.TestK1.foo' type=<root>.TestK1 origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K1' type=<root>.K1 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 [operator] declared in kotlin.Any
|
||||
@@ -188,9 +186,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK2 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>.TestK2 declared in <root>.TestK2' type=<root>.TestK2 origin=null
|
||||
value: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K2' type=<root>.K2 origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestK2) returnType:kotlin.String
|
||||
overridden:
|
||||
public abstract fun foo (): kotlin.String declared in <root>.IFoo
|
||||
@@ -201,6 +196,8 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.TestK2 declared in <root>.TestK2.foo' type=<root>.TestK2 origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K2' type=<root>.K2 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 [operator] declared in kotlin.Any
|
||||
@@ -220,9 +217,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK3 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>.TestK3 declared in <root>.TestK3' type=<root>.TestK3 origin=null
|
||||
value: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K3' type=<root>.K3 origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestK3) returnType:kotlin.String
|
||||
overridden:
|
||||
public abstract fun foo (): kotlin.String declared in <root>.IFoo
|
||||
@@ -233,6 +227,8 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.TestK3 declared in <root>.TestK3.foo' type=<root>.TestK3 origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K3' type=<root>.K3 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 [operator] declared in kotlin.Any
|
||||
@@ -252,9 +248,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK4 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>.TestK4 declared in <root>.TestK4' type=<root>.TestK4 origin=null
|
||||
value: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K4' type=<root>.K4 origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestK4) returnType:kotlin.String
|
||||
overridden:
|
||||
public abstract fun foo (): kotlin.String declared in <root>.IFoo
|
||||
@@ -265,6 +258,8 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]' type=<root>.IFoo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.TestK4 declared in <root>.TestK4.foo' type=<root>.TestK4 origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.IFoo visibility:local [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K4' type=<root>.K4 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 [operator] declared in kotlin.Any
|
||||
|
||||
Reference in New Issue
Block a user