[K/N, K/JS, K/WASM] Enable FakeOverrideRebuilder by default
While not beeing final solution, this is closer to what we want to have in the end. Enabling on non-JVM targets would help better testing. Enabling in JVM is now not possible yet, as some of the bugs are not fixed yet (check KT-61360 for details) ^KT-62476
This commit is contained in:
committed by
Space Team
parent
c6e32571d6
commit
f45d92eebc
@@ -1,183 +0,0 @@
|
||||
FILE fqName:<root> fileName:/SignatureClash.kt
|
||||
TYPEALIAS name:Some visibility:public expandedType:kotlin.Function1<kotlin.Any, kotlin.String?>
|
||||
CLASS OBJECT name:Factory modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Factory
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Factory [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Factory modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Factory, a:kotlin.String) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Factory
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (a: kotlin.String): kotlin.String declared in <root>.Factory'
|
||||
CONST String type=kotlin.String value="Alpha"
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Factory, a:kotlin.String, f:kotlin.Function1<kotlin.Any, kotlin.String?>) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Factory
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.String
|
||||
VALUE_PARAMETER name:f index:1 type:kotlin.Function1<kotlin.Any, kotlin.String?>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (a: kotlin.String, f: kotlin.Function1<kotlin.Any, kotlin.String?>): kotlin.String declared in <root>.Factory'
|
||||
CONST String type=kotlin.String value="Omega"
|
||||
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:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<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 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:Delegate modality:ABSTRACT visibility:public superTypes:[<root>.Base]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegate
|
||||
FUN name:bar visibility:public modality:ABSTRACT <> ($this:<root>.Delegate) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
|
||||
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:Derived modality:ABSTRACT visibility:public superTypes:[<root>.Delegate]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Derived
|
||||
FUN FAKE_OVERRIDE name:bar visibility:public modality:ABSTRACT <> ($this:<root>.Delegate) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
public abstract fun bar (): kotlin.Unit declared in <root>.Delegate
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
|
||||
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>.Delegate
|
||||
$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>.Delegate
|
||||
$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>.Delegate
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:DataClass modality:FINAL visibility:public [data] superTypes:[<root>.Derived; <root>.Delegate]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DataClass
|
||||
CONSTRUCTOR visibility:public <> (delegate:<root>.Delegate) returnType:<root>.DataClass [primary]
|
||||
VALUE_PARAMETER name:delegate index:0 type:<root>.Delegate
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DataClass modality:FINAL visibility:public [data] superTypes:[<root>.Derived; <root>.Delegate]'
|
||||
PROPERTY name:delegate visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'delegate: <root>.Delegate declared in <root>.DataClass.<init>' type=<root>.Delegate origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-delegate> visibility:public modality:FINAL <> ($this:<root>.DataClass) returnType:<root>.Delegate
|
||||
correspondingProperty: PROPERTY name:delegate visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-delegate> (): <root>.Delegate declared in <root>.DataClass'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.<get-delegate>' type=<root>.DataClass origin=null
|
||||
FUN DELEGATED_MEMBER name:bar visibility:public modality:OPEN <> ($this:<root>.DataClass) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun bar (): kotlin.Unit declared in <root>.Derived
|
||||
public abstract fun bar (): kotlin.Unit declared in <root>.Delegate
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun bar (): kotlin.Unit declared in <root>.Delegate' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.bar' type=<root>.DataClass origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.DataClass) returnType:<root>.Delegate [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun component1 (): <root>.Delegate declared in <root>.DataClass'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.component1' type=<root>.DataClass origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.DataClass, delegate:<root>.Delegate) returnType:<root>.DataClass
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
|
||||
VALUE_PARAMETER name:delegate index:0 type:<root>.Delegate
|
||||
EXPRESSION_BODY
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.copy' type=<root>.DataClass origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (delegate: <root>.Delegate): <root>.DataClass declared in <root>.DataClass'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (delegate: <root>.Delegate) declared in <root>.DataClass' type=<root>.DataClass origin=null
|
||||
delegate: GET_VAR 'delegate: <root>.Delegate declared in <root>.DataClass.copy' type=<root>.Delegate origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.DataClass) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.DataClass'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="DataClass("
|
||||
CONST String type=kotlin.String value="delegate="
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.toString' type=<root>.DataClass origin=null
|
||||
CONST String type=kotlin.String value=")"
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.DataClass) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.DataClass'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in <root>.Delegate' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.hashCode' type=<root>.DataClass origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.DataClass, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
|
||||
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>.DataClass declared in <root>.DataClass.equals' type=<root>.DataClass origin=null
|
||||
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.DataClass.equals' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.DataClass'
|
||||
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>.DataClass
|
||||
GET_VAR 'other: kotlin.Any? declared in <root>.DataClass.equals' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.DataClass'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.DataClass [val]
|
||||
TYPE_OP type=<root>.DataClass origin=CAST typeOperand=<root>.DataClass
|
||||
GET_VAR 'other: kotlin.Any? declared in <root>.DataClass.equals' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun not (): kotlin.Boolean 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:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
|
||||
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.equals' type=<root>.DataClass origin=null
|
||||
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
|
||||
receiver: GET_VAR 'val tmp_0: <root>.DataClass declared in <root>.DataClass.equals' type=<root>.DataClass origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.DataClass'
|
||||
CONST Boolean type=kotlin.Boolean value=false
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.DataClass'
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
@@ -1,76 +0,0 @@
|
||||
typealias Some = Function1<Any, String?>
|
||||
object Factory {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
fun foo(a: String): String {
|
||||
return "Alpha"
|
||||
}
|
||||
|
||||
fun foo(a: String, f: Function1<Any, String?>): String {
|
||||
return "Omega"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface Base {
|
||||
}
|
||||
|
||||
interface Delegate : Base {
|
||||
abstract fun bar()
|
||||
|
||||
}
|
||||
|
||||
interface Derived : Delegate {
|
||||
}
|
||||
|
||||
data class DataClass : Derived, Delegate {
|
||||
constructor(delegate: Delegate) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val delegate: Delegate
|
||||
field = delegate
|
||||
get
|
||||
|
||||
override fun bar() {
|
||||
<this>.#delegate.bar()
|
||||
}
|
||||
|
||||
operator fun component1(): Delegate {
|
||||
return <this>.#delegate
|
||||
}
|
||||
|
||||
fun copy(delegate: Delegate = <this>.#delegate): DataClass {
|
||||
return DataClass(delegate = delegate)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "DataClass(" + "delegate=" + <this>.#delegate + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#delegate.hashCode()
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is DataClass -> return false
|
||||
}
|
||||
val tmp_0: DataClass = other as DataClass
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#delegate, arg1 = tmp_0.#delegate).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// KT-64271
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
typealias Some = (Any) -> String?
|
||||
|
||||
object Factory {
|
||||
|
||||
Reference in New Issue
Block a user