Files
kotlin-fork/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt
T
2020-11-26 00:14:07 +03:00

41 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? = takeUnless<Int>($receiver = <this>.read(), predicate = local fun <anonymous>(it: Int): Boolean {
return EQEQ(arg0 = it, arg1 = -1)
}
)
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
true -> tmp0_safe_receiver.toChar()
}
}
}
fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) {
var ch: Char? = nextChar($receiver = <this>)
while (when {
EQEQ(arg0 = ch, arg1 = null).not() -> EQEQ(arg0 = ch, arg1 = quote).not()
true -> false
}) { //BLOCK
when {
EQEQ(arg0 = ch, arg1 = <get-BACKSLASH>()) -> { //BLOCK
val tmp0_safe_receiver: Char? = nextChar($receiver = <this>)
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
true -> let<Char, @FlexibleNullability StringBuilder?>($receiver = tmp0_safe_receiver, block = local fun <anonymous>(it: Char): @FlexibleNullability StringBuilder? {
return sb.append(p0 = it)
}
)
}
} /*~> Unit */
true -> sb.append(p0 = ch) /*~> Unit */
}
ch = nextChar($receiver = <this>)
}
}