Files
kotlin-fork/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt
T
Denis.Zharkov 1e0d9f4075 FIR2IR: Do not add implicit casts for types with different nullability
For smart casts, elvises, etc., there are no implicit casts in psi2fir
in changed test data
2021-01-29 10:50:22 +03:00

40 lines
1.1 KiB
Plaintext
Vendored

private const val BACKSLASH: Char
field = '\\'
private get
private fun Reader.nextChar(): Char? {
return { // BLOCK
val tmp0_safe_receiver: Int? = <this>.read().takeUnless<Int>(predicate = local fun <anonymous>(it: Int): Boolean {
return EQEQ(arg0 = it, arg1 = -1)
}
)
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.toChar()
}
}
}
fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) {
var ch: Char? = <this>.nextChar()
while (when {
EQEQ(arg0 = ch, arg1 = null).not() -> EQEQ(arg0 = ch, arg1 = quote).not()
else -> false
}) { // BLOCK
when {
EQEQ(arg0 = ch, arg1 = <get-BACKSLASH>()) -> { // BLOCK
val tmp1_safe_receiver: Char? = <this>.nextChar()
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.let<Char, StringBuilder?>(block = local fun <anonymous>(it: Char): StringBuilder? {
return sb.append(p0 = it)
}
)
}
}
else -> sb.append(p0 = ch)
} /*~> Unit */
ch = <this>.nextChar()
}
}