Files
kotlin-fork/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.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

40 lines
1.2 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 tmp0_safe_receiver: Char? = <this>.nextChar()
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.let<Char, @FlexibleNullability StringBuilder?>(block = local fun <anonymous>(it: Char): @FlexibleNullability StringBuilder? {
return sb.append(p0 = it)
}
)
}
} /*~> Unit */
else -> sb.append(p0 = ch) /*~> Unit */
}
ch = <this>.nextChar()
}
}