Add tests for KT-52745
This commit is contained in:
+167
@@ -0,0 +1,167 @@
|
||||
FILE fqName:<root> fileName:/delegationInSealed.kt
|
||||
CLASS CLASS name:A modality:SEALED visibility:public superTypes:[kotlin.CharSequence]
|
||||
sealedSubclasses:
|
||||
CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[<root>.A; kotlin.CharSequence]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
|
||||
CONSTRUCTOR visibility:protected <> () returnType:<root>.A [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:SEALED visibility:public superTypes:[kotlin.CharSequence]'
|
||||
CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[<root>.A; kotlin.CharSequence]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.B
|
||||
CONSTRUCTOR visibility:public <> (c:kotlin.CharSequence) returnType:<root>.A.B [primary]
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.CharSequence
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.A'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[<root>.A; kotlin.CharSequence]'
|
||||
FUN DELEGATED_MEMBER name:get visibility:public modality:OPEN <> ($this:<root>.A.B, index:kotlin.Int) returnType:kotlin.Char [operator]
|
||||
overridden:
|
||||
public abstract fun get (index: kotlin.Int): kotlin.Char [operator] declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
VALUE_PARAMETER name:index index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun get (index: kotlin.Int): kotlin.Char [operator] declared in <root>.A.B'
|
||||
CALL 'public abstract fun get (index: kotlin.Int): kotlin.Char [operator] declared in kotlin.CharSequence' type=kotlin.Char origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.get' type=<root>.A.B origin=null
|
||||
index: GET_VAR 'index: kotlin.Int declared in <root>.A.B.get' type=kotlin.Int origin=null
|
||||
FUN DELEGATED_MEMBER name:subSequence visibility:public modality:OPEN <> ($this:<root>.A.B, startIndex:kotlin.Int, endIndex:kotlin.Int) returnType:kotlin.CharSequence
|
||||
overridden:
|
||||
public abstract fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
VALUE_PARAMETER name:startIndex index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:endIndex index:1 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in <root>.A.B'
|
||||
CALL 'public abstract fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in kotlin.CharSequence' type=kotlin.CharSequence origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.subSequence' type=<root>.A.B origin=null
|
||||
startIndex: GET_VAR 'startIndex: kotlin.Int declared in <root>.A.B.subSequence' type=kotlin.Int origin=null
|
||||
endIndex: GET_VAR 'endIndex: kotlin.Int declared in <root>.A.B.subSequence' type=kotlin.Int origin=null
|
||||
PROPERTY DELEGATED_MEMBER name:length visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
public abstract length: kotlin.Int [val]
|
||||
FUN DELEGATED_MEMBER name:<get-length> visibility:public modality:OPEN <> ($this:<root>.A.B) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY DELEGATED_MEMBER name:length visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
public abstract fun <get-length> (): kotlin.Int declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun <get-length> (): kotlin.Int declared in <root>.A.B'
|
||||
CALL 'public abstract fun <get-length> (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.<get-length>' type=<root>.A.B origin=null
|
||||
PROPERTY name:c visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'c: kotlin.CharSequence declared in <root>.A.B.<init>' type=kotlin.CharSequence origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:public modality:FINAL <> ($this:<root>.A.B) returnType:kotlin.CharSequence
|
||||
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-c> (): kotlin.CharSequence declared in <root>.A.B'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.<get-c>' type=<root>.A.B origin=null
|
||||
FUN name:component1 visibility:public modality:FINAL <> ($this:<root>.A.B) returnType:kotlin.CharSequence [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.CharSequence [operator] declared in <root>.A.B'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.component1' type=<root>.A.B origin=null
|
||||
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.A.B, c:kotlin.CharSequence) returnType:<root>.A.B
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.CharSequence
|
||||
EXPRESSION_BODY
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.copy' type=<root>.A.B origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (c: kotlin.CharSequence): <root>.A.B declared in <root>.A.B'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (c: kotlin.CharSequence) [primary] declared in <root>.A.B' type=<root>.A.B origin=null
|
||||
c: GET_VAR 'c: kotlin.CharSequence declared in <root>.A.B.copy' type=kotlin.CharSequence origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.A.B, other:kotlin.Any?) returnType:kotlin.Boolean
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.A.B
|
||||
VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any?
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
|
||||
arg0: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.equals' type=<root>.A.B origin=null
|
||||
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.A.B.equals' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A.B'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.A.B
|
||||
GET_VAR 'other: kotlin.Any? declared in <root>.A.B.equals' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A.B'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.A.B [val]
|
||||
TYPE_OP type=<root>.A.B origin=CAST typeOperand=<root>.A.B
|
||||
GET_VAR 'other: kotlin.Any? declared in <root>.A.B.equals' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.equals' type=<root>.A.B origin=null
|
||||
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR 'val tmp_0: <root>.A.B [val] declared in <root>.A.B.equals' type=<root>.A.B origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A.B'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A.B'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.A.B) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.A.B'
|
||||
CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.CharSequence' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.hashCode' type=<root>.A.B origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.A.B) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.A.B'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="B("
|
||||
CONST String type=kotlin.String value="c="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.toString' type=<root>.A.B origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:kotlin.CharSequence, index:kotlin.Int) returnType:kotlin.Char [fake_override,operator]
|
||||
overridden:
|
||||
public abstract fun get (index: kotlin.Int): kotlin.Char [operator] declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.CharSequence
|
||||
VALUE_PARAMETER name:index index:0 type:kotlin.Int
|
||||
FUN FAKE_OVERRIDE name:subSequence visibility:public modality:ABSTRACT <> ($this:kotlin.CharSequence, startIndex:kotlin.Int, endIndex:kotlin.Int) returnType:kotlin.CharSequence [fake_override]
|
||||
overridden:
|
||||
public abstract fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.CharSequence
|
||||
VALUE_PARAMETER name:startIndex index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:endIndex index:1 type:kotlin.Int
|
||||
PROPERTY FAKE_OVERRIDE name:length visibility:public modality:ABSTRACT [fake_override,val]
|
||||
overridden:
|
||||
public abstract length: kotlin.Int [val]
|
||||
FUN FAKE_OVERRIDE name:<get-length> visibility:public modality:ABSTRACT <> ($this:kotlin.CharSequence) returnType:kotlin.Int [fake_override]
|
||||
correspondingProperty: PROPERTY FAKE_OVERRIDE name:length visibility:public modality:ABSTRACT [fake_override,val]
|
||||
overridden:
|
||||
public abstract fun <get-length> (): kotlin.Int declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.CharSequence
|
||||
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.CharSequence
|
||||
$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.CharSequence
|
||||
$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.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
sealed class A : CharSequence {
|
||||
protected constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
data class B : A, CharSequence {
|
||||
constructor(c: CharSequence) /* primary */ {
|
||||
super/*A*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override operator fun get(index: Int): Char {
|
||||
return <this>.#c.get(index = index)
|
||||
}
|
||||
|
||||
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence {
|
||||
return <this>.#c.subSequence(startIndex = startIndex, endIndex = endIndex)
|
||||
}
|
||||
|
||||
override val length: Int
|
||||
override get(): Int {
|
||||
return <this>.#c.<get-length>()
|
||||
}
|
||||
|
||||
val c: CharSequence
|
||||
field = c
|
||||
get
|
||||
|
||||
operator fun component1(): CharSequence {
|
||||
return <this>.#c
|
||||
}
|
||||
|
||||
fun copy(c: CharSequence = <this>.#c): B {
|
||||
return B(c = c)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is B -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: B = other as B
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#c, arg1 = tmp0_other_with_cast.#c).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#c.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "B(" + "c=" + <this>.#c + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
FILE fqName:<root> fileName:/delegationInSealed.kt
|
||||
CLASS CLASS name:A modality:SEALED visibility:public superTypes:[kotlin.CharSequence]
|
||||
sealedSubclasses:
|
||||
CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[<root>.A; kotlin.CharSequence]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
|
||||
CONSTRUCTOR visibility:protected <> () returnType:<root>.A [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:SEALED visibility:public superTypes:[kotlin.CharSequence]'
|
||||
CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[<root>.A; kotlin.CharSequence]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.B
|
||||
CONSTRUCTOR visibility:public <> (c:kotlin.CharSequence) returnType:<root>.A.B [primary]
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.CharSequence
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.A'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[<root>.A; kotlin.CharSequence]'
|
||||
PROPERTY name:c visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'c: kotlin.CharSequence declared in <root>.A.B.<init>' type=kotlin.CharSequence origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:public modality:FINAL <> ($this:<root>.A.B) returnType:kotlin.CharSequence
|
||||
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-c> (): kotlin.CharSequence declared in <root>.A.B'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.<get-c>' type=<root>.A.B origin=null
|
||||
PROPERTY DELEGATED_MEMBER name:length visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
public abstract length: kotlin.Int [fake_override,val]
|
||||
public abstract length: kotlin.Int [val]
|
||||
FUN DELEGATED_MEMBER name:<get-length> visibility:public modality:OPEN <> ($this:<root>.A.B) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY DELEGATED_MEMBER name:length visibility:public modality:OPEN [val]
|
||||
overridden:
|
||||
public abstract fun <get-length> (): kotlin.Int [fake_override] declared in <root>.A
|
||||
public abstract fun <get-length> (): kotlin.Int declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun <get-length> (): kotlin.Int declared in <root>.A.B'
|
||||
CALL 'public abstract fun <get-length> (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.<get-length>' type=<root>.A.B origin=null
|
||||
FUN DELEGATED_MEMBER name:get visibility:public modality:OPEN <> ($this:<root>.A.B, index:kotlin.Int) returnType:kotlin.Char [operator]
|
||||
overridden:
|
||||
public abstract fun get (index: kotlin.Int): kotlin.Char [fake_override,operator] declared in <root>.A
|
||||
public abstract fun get (index: kotlin.Int): kotlin.Char [operator] declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
VALUE_PARAMETER name:index index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun get (index: kotlin.Int): kotlin.Char [operator] declared in <root>.A.B'
|
||||
CALL 'public abstract fun get (index: kotlin.Int): kotlin.Char [operator] declared in kotlin.CharSequence' type=kotlin.Char origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.get' type=<root>.A.B origin=null
|
||||
index: GET_VAR 'index: kotlin.Int declared in <root>.A.B.get' type=kotlin.Int origin=null
|
||||
FUN DELEGATED_MEMBER name:subSequence visibility:public modality:OPEN <> ($this:<root>.A.B, startIndex:kotlin.Int, endIndex:kotlin.Int) returnType:kotlin.CharSequence
|
||||
overridden:
|
||||
public abstract fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence [fake_override] declared in <root>.A
|
||||
public abstract fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
VALUE_PARAMETER name:startIndex index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:endIndex index:1 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in <root>.A.B'
|
||||
CALL 'public abstract fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in kotlin.CharSequence' type=kotlin.CharSequence origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.subSequence' type=<root>.A.B origin=null
|
||||
startIndex: GET_VAR 'startIndex: kotlin.Int declared in <root>.A.B.subSequence' type=kotlin.Int origin=null
|
||||
endIndex: GET_VAR 'endIndex: kotlin.Int declared in <root>.A.B.subSequence' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.A.B) returnType:kotlin.CharSequence [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.CharSequence [operator] declared in <root>.A.B'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.component1' type=<root>.A.B origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.A.B, c:kotlin.CharSequence) returnType:<root>.A.B
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.CharSequence
|
||||
EXPRESSION_BODY
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.copy' type=<root>.A.B origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (c: kotlin.CharSequence): <root>.A.B declared in <root>.A.B'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (c: kotlin.CharSequence) [primary] declared in <root>.A.B' type=<root>.A.B origin=null
|
||||
c: GET_VAR 'c: kotlin.CharSequence declared in <root>.A.B.copy' type=kotlin.CharSequence origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.A.B) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in <root>.A
|
||||
public open fun toString (): kotlin.String [fake_override] declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.A.B'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="B("
|
||||
CONST String type=kotlin.String value="c="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.toString' type=<root>.A.B origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.A.B) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.A
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.A.B'
|
||||
CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.CharSequence' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.hashCode' type=<root>.A.B origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.A.B, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.A
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
|
||||
arg0: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.equals' type=<root>.A.B origin=null
|
||||
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.A.B.equals' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.A.B'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.A.B
|
||||
GET_VAR 'other: kotlin.Any? declared in <root>.A.B.equals' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.A.B'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.A.B [val]
|
||||
TYPE_OP type=<root>.A.B origin=CAST typeOperand=<root>.A.B
|
||||
GET_VAR 'other: kotlin.Any? declared in <root>.A.B.equals' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.equals' type=<root>.A.B origin=null
|
||||
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
|
||||
receiver: GET_VAR 'val tmp_0: <root>.A.B [val] declared in <root>.A.B.equals' type=<root>.A.B origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.A.B'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.A.B'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
PROPERTY FAKE_OVERRIDE name:length visibility:public modality:ABSTRACT [fake_override,val]
|
||||
overridden:
|
||||
public abstract length: kotlin.Int [val]
|
||||
FUN FAKE_OVERRIDE name:<get-length> visibility:public modality:ABSTRACT <> ($this:kotlin.CharSequence) returnType:kotlin.Int [fake_override]
|
||||
correspondingProperty: PROPERTY FAKE_OVERRIDE name:length visibility:public modality:ABSTRACT [fake_override,val]
|
||||
overridden:
|
||||
public abstract fun <get-length> (): kotlin.Int declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.CharSequence
|
||||
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.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:kotlin.CharSequence, index:kotlin.Int) returnType:kotlin.Char [fake_override,operator]
|
||||
overridden:
|
||||
public abstract fun get (index: kotlin.Int): kotlin.Char [operator] declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.CharSequence
|
||||
VALUE_PARAMETER name:index index:0 type:kotlin.Int
|
||||
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.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:subSequence visibility:public modality:ABSTRACT <> ($this:kotlin.CharSequence, startIndex:kotlin.Int, endIndex:kotlin.Int) returnType:kotlin.CharSequence [fake_override]
|
||||
overridden:
|
||||
public abstract fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in kotlin.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.CharSequence
|
||||
VALUE_PARAMETER name:startIndex index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:endIndex index:1 type:kotlin.Int
|
||||
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.CharSequence
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// SKIP_KLIB_TEST
|
||||
|
||||
sealed class A : CharSequence {
|
||||
data class B(val c: CharSequence) : A(), CharSequence by c
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
sealed class A : CharSequence {
|
||||
protected constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
data class B : A, CharSequence {
|
||||
constructor(c: CharSequence) /* primary */ {
|
||||
super/*A*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val c: CharSequence
|
||||
field = c
|
||||
get
|
||||
|
||||
override val length: Int
|
||||
override get(): Int {
|
||||
return <this>.#c.<get-length>()
|
||||
}
|
||||
|
||||
override operator fun get(index: Int): Char {
|
||||
return <this>.#c.get(index = index)
|
||||
}
|
||||
|
||||
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence {
|
||||
return <this>.#c.subSequence(startIndex = startIndex, endIndex = endIndex)
|
||||
}
|
||||
|
||||
operator fun component1(): CharSequence {
|
||||
return <this>.#c
|
||||
}
|
||||
|
||||
fun copy(c: CharSequence = <this>.#c): B {
|
||||
return B(c = c)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "B(" + "c=" + <this>.#c + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#c.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is B -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: B = other as B
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#c, arg1 = tmp0_other_with_cast.#c).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user