Files
kotlin-fork/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

78 lines
1.4 KiB
Plaintext
Vendored

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 tmp0_other_with_cast: DataClass = other as DataClass
when {
EQEQ(arg0 = <this>.#delegate, arg1 = tmp0_other_with_cast.#delegate).not() -> return false
}
return true
}
}