65 lines
1.3 KiB
Plaintext
Vendored
65 lines
1.3 KiB
Plaintext
Vendored
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
|
|
}
|
|
|
|
}
|
|
|
|
}
|