[IR] Consider flexibility of the return type for intersection overrides
^KT-65207 Fixed
This commit is contained in:
committed by
Space Team
parent
9302c8c14d
commit
3c86a4f9df
@@ -13,4 +13,4 @@ abstract class J {
|
||||
abstract fun foo(): Child
|
||||
}
|
||||
|
||||
abstract class A : I, J()
|
||||
abstract class A : I, J()
|
||||
|
||||
@@ -7,22 +7,22 @@ FILE fqName:<root> fileName:/1.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1'
|
||||
<T>: R of <root>.C
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[<root>.Java1<R of <root>.C>; <root>.KotlinInterface<R of <root>.C>]'
|
||||
FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN <> ($this:<root>.Java1<R of <root>.C>) returnType:@[FlexibleNullability] java.util.ArrayList<@[FlexibleNullability] kotlin.Int?>? [fake_override]
|
||||
FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN <> ($this:<root>.KotlinInterface<R of <root>.C>) returnType:java.util.ArrayList<kotlin.Int> [fake_override]
|
||||
overridden:
|
||||
public open fun bar (): @[FlexibleNullability] java.util.ArrayList<@[FlexibleNullability] kotlin.Int?>? declared in <root>.Java1
|
||||
public abstract fun bar (): java.util.ArrayList<kotlin.Int> declared in <root>.KotlinInterface
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Java1<R of <root>.C>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface<R of <root>.C>
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Java1
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.KotlinInterface
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:<root>.Java1<R of <root>.C>) returnType:@[FlexibleNullability] R of <root>.C? [fake_override]
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:<root>.KotlinInterface<R of <root>.C>) returnType:R of <root>.C [fake_override]
|
||||
overridden:
|
||||
public open fun foo (): @[FlexibleNullability] T of <root>.Java1? declared in <root>.Java1
|
||||
public abstract fun foo (): T of <root>.KotlinInterface declared in <root>.KotlinInterface
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Java1<R of <root>.C>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInterface<R of <root>.C>
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in <root>.Java1
|
||||
|
||||
@@ -9,16 +9,16 @@ abstract class C<R : Any?> : Java1<R>, KotlinInterface<R> {
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: C#bar(){}java.util.ArrayList<kotlin.Int?>?
|
||||
// Public signature: /C.bar|6344786471503787921[0]
|
||||
// Public signature debug description: bar(){}java.util.ArrayList<kotlin.Int?>?
|
||||
/* fake */ override fun bar(): ArrayList<Int?>?
|
||||
// Mangled name: C#bar(){}java.util.ArrayList<kotlin.Int>
|
||||
// Public signature: /C.bar|3123552224271008170[0]
|
||||
// Public signature debug description: bar(){}java.util.ArrayList<kotlin.Int>
|
||||
/* fake */ override fun bar(): ArrayList<Int>
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: C#foo(){}1:0?
|
||||
// Public signature: /C.foo|-1179576840814333363[0]
|
||||
// Public signature debug description: foo(){}1:0?
|
||||
/* fake */ override fun foo(): R?
|
||||
// Mangled name: C#foo(){}1:0
|
||||
// Public signature: /C.foo|-5478580208809996038[0]
|
||||
// Public signature debug description: foo(){}1:0
|
||||
/* fake */ override fun foo(): R
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user