[IRFakeOverrides] Convert lazy callables overriddens during f/o building
Unfortunately, it's not enough to know direct overriddens to correctly build fake overrides. This mean, that we need to know whole overridden tree during the process of building. It happens automatically for normal classes, but not for lazy classes, as their overriddens are built separatly. This commit enforces correct overrddens for lazy classes in hierarhies at the point, where they should be normally computed. ^KT-65236
This commit is contained in:
committed by
Space Team
parent
caa6918031
commit
c0152ccf0f
@@ -0,0 +1,104 @@
|
||||
FILE fqName:<root> fileName:/fakeOverrideModality.kt
|
||||
CLASS CLASS name:Base modality:OPEN visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Base
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Base [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Base modality:OPEN visibility:public superTypes:[kotlin.Any]'
|
||||
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 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:Child modality:FINAL visibility:public superTypes:[<root>.Base]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Child
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Child [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Child modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||
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>.Base
|
||||
$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 <root>.Base
|
||||
$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 <root>.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS INTERFACE name:I modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.I
|
||||
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.I) returnType:<root>.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.I
|
||||
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 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:J modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.J
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.J [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:J modality:ABSTRACT visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.J) returnType:<root>.Child
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.J
|
||||
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 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:A modality:ABSTRACT visibility:public superTypes:[<root>.I; <root>.J]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.A [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[<root>.I; <root>.J]'
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:ABSTRACT <> ($this:<root>.J) returnType:<root>.Child [fake_override]
|
||||
overridden:
|
||||
public abstract fun foo (): <root>.Base declared in <root>.I
|
||||
public abstract fun foo (): <root>.Child declared in <root>.J
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.J
|
||||
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>.I
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.J
|
||||
$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 <root>.I
|
||||
public open fun hashCode (): kotlin.Int declared in <root>.J
|
||||
$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 <root>.I
|
||||
public open fun toString (): kotlin.String declared in <root>.J
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
@@ -0,0 +1,16 @@
|
||||
// FIR_IDENTICAL
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
open class Base
|
||||
class Child: Base()
|
||||
|
||||
interface I {
|
||||
fun foo(): Base
|
||||
}
|
||||
|
||||
abstract class J {
|
||||
abstract fun foo(): Child
|
||||
}
|
||||
|
||||
abstract class A : I, J()
|
||||
@@ -0,0 +1,42 @@
|
||||
open class Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Child : Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface I {
|
||||
abstract fun foo(): Base
|
||||
|
||||
}
|
||||
|
||||
abstract class J {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
abstract fun foo(): Child
|
||||
|
||||
}
|
||||
|
||||
abstract class A : I, J {
|
||||
constructor() /* primary */ {
|
||||
super/*J*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
// CHECK:
|
||||
// Mangled name: A
|
||||
// Public signature: /A|null[0]
|
||||
abstract class A : J, I {
|
||||
// CHECK:
|
||||
// Mangled name: A#<init>(){}
|
||||
// Public signature: /A.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: A#foo(){}Child
|
||||
// Public signature: /A.foo|8517421086584195144[0]
|
||||
// Public signature debug description: foo(){}Child
|
||||
abstract /* fake */ override fun foo(): Child
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Base
|
||||
// Public signature: /Base|null[0]
|
||||
open class Base {
|
||||
// CHECK:
|
||||
// Mangled name: Base#<init>(){}
|
||||
// Public signature: /Base.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Child
|
||||
// Public signature: /Child|null[0]
|
||||
class Child : Base {
|
||||
// CHECK:
|
||||
// Mangled name: Child#<init>(){}
|
||||
// Public signature: /Child.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: J
|
||||
// Public signature: /J|null[0]
|
||||
abstract class J {
|
||||
// CHECK:
|
||||
// Mangled name: J#<init>(){}
|
||||
// Public signature: /J.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: J#foo(){}Child
|
||||
// Public signature: /J.foo|8517421086584195144[0]
|
||||
// Public signature debug description: foo(){}Child
|
||||
abstract fun foo(): Child
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: I
|
||||
// Public signature: /I|null[0]
|
||||
interface I {
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: I#foo(){}Base
|
||||
// Public signature: /I.foo|-5590126600799232132[0]
|
||||
// Public signature debug description: foo(){}Base
|
||||
abstract fun foo(): Base
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
FILE fqName:<root> fileName:/E.kt
|
||||
CLASS INTERFACE name:II modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.II
|
||||
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.II) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.II
|
||||
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 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:I modality:ABSTRACT visibility:public superTypes:[<root>.II]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.I
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:<root>.II) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
public open fun foo (): kotlin.Unit declared in <root>.II
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.II
|
||||
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>.II
|
||||
$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 <root>.II
|
||||
$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 <root>.II
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[<root>.I]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[<root>.I]'
|
||||
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.C) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public open fun foo (): kotlin.Unit declared in <root>.I
|
||||
$this: VALUE_PARAMETER name:<this> type:<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>.I
|
||||
$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 <root>.I
|
||||
$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 <root>.I
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:D modality:ABSTRACT visibility:public superTypes:[<root>.C; <root>.J]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.D
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.D [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:D modality:ABSTRACT visibility:public superTypes:[<root>.C; <root>.J]'
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:ABSTRACT <> ($this:<root>.C) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
public abstract fun foo (): kotlin.Unit declared in <root>.C
|
||||
public open fun foo (): kotlin.Unit declared in <root>.J
|
||||
$this: VALUE_PARAMETER name:<this> type:<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>.C
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.J
|
||||
$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 <root>.C
|
||||
public open fun hashCode (): kotlin.Int declared in <root>.J
|
||||
$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 <root>.C
|
||||
public open fun toString (): kotlin.String declared in <root>.J
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:E modality:FINAL visibility:public superTypes:[<root>.D]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.E
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.E [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.D'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:E modality:FINAL visibility:public superTypes:[<root>.D]'
|
||||
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.E) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun foo (): kotlin.Unit declared in <root>.D
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.E
|
||||
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 declared in <root>.D
|
||||
$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 <root>.D
|
||||
$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 <root>.D
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:foo visibility:public modality:FINAL <> (x:<root>.I) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:x index:0 type:<root>.I
|
||||
BLOCK_BODY
|
||||
CALL 'public open fun foo (): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'x: <root>.I declared in <root>.foo' type=<root>.I origin=null
|
||||
@@ -0,0 +1,32 @@
|
||||
// FIR_IDENTICAL
|
||||
// ENABLE_IR_FAKE_OVERRIDE_GENERATION
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// FILE: J.java
|
||||
|
||||
interface J extends I {
|
||||
|
||||
}
|
||||
|
||||
// FILE: E.kt
|
||||
|
||||
interface II {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
interface I : II {
|
||||
}
|
||||
|
||||
abstract class C: I {
|
||||
override abstract fun foo()
|
||||
}
|
||||
|
||||
abstract class D : C(), J {}
|
||||
|
||||
class E : D() {
|
||||
override fun foo() {}
|
||||
}
|
||||
|
||||
fun foo(x : I) {
|
||||
x.foo()
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
interface II {
|
||||
fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface I : II {
|
||||
}
|
||||
|
||||
abstract class C : I {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
abstract override fun foo()
|
||||
|
||||
}
|
||||
|
||||
abstract class D : C, J {
|
||||
constructor() /* primary */ {
|
||||
super/*C*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class E : D {
|
||||
constructor() /* primary */ {
|
||||
super/*D*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun foo(x: I) {
|
||||
x.foo()
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// CHECK:
|
||||
// Mangled name: C
|
||||
// Public signature: /C|null[0]
|
||||
abstract class C : I {
|
||||
// CHECK:
|
||||
// Mangled name: C#<init>(){}
|
||||
// Public signature: /C.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: C#foo(){}
|
||||
// Public signature: /C.foo|-1041209573719867811[0]
|
||||
// Public signature debug description: foo(){}
|
||||
abstract override fun foo(): Unit
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: D
|
||||
// Public signature: /D|null[0]
|
||||
abstract class D : C, J {
|
||||
// CHECK:
|
||||
// Mangled name: D#<init>(){}
|
||||
// Public signature: /D.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: D#foo(){}
|
||||
// Public signature: /D.foo|-1041209573719867811[0]
|
||||
// Public signature debug description: foo(){}
|
||||
abstract /* fake */ override fun foo(): Unit
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: E
|
||||
// Public signature: /E|null[0]
|
||||
class E : D {
|
||||
// CHECK:
|
||||
// Mangled name: E#<init>(){}
|
||||
// Public signature: /E.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: E#foo(){}
|
||||
// Public signature: /E.foo|-1041209573719867811[0]
|
||||
// Public signature debug description: foo(){}
|
||||
override fun foo(): Unit
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: I
|
||||
// Public signature: /I|null[0]
|
||||
interface I : II {
|
||||
// CHECK:
|
||||
// Mangled name: I#foo(){}
|
||||
// Public signature: /I.foo|-1041209573719867811[0]
|
||||
// Public signature debug description: foo(){}
|
||||
/* fake */ override fun foo(): Unit
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: II
|
||||
// Public signature: /II|null[0]
|
||||
interface II {
|
||||
// CHECK:
|
||||
// Mangled name: II#foo(){}
|
||||
// Public signature: /II.foo|-1041209573719867811[0]
|
||||
// Public signature debug description: foo(){}
|
||||
fun foo(): Unit
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #foo(I){}
|
||||
// Public signature: /foo|-4109751996049019888[0]
|
||||
// Public signature debug description: foo(I){}
|
||||
fun foo(x: I): Unit
|
||||
Reference in New Issue
Block a user