// FIR_IDENTICAL // SKIP_TXT interface SelectBuilder { fun foo(block: () -> X) } fun select1(builder: SelectBuilder.() -> Unit): R = TODO() fun select2(builder: SelectBuilder.() -> Unit): F = TODO() fun myRun(builder: () -> Q): Q = TODO() fun bar(w1: H?, w2: H?) { val h1: H = myRun { select1 { foo { w1 } } ?: select2 { foo { w2 } } ?: throw RuntimeException() } val h2: H = try { select1 { foo { w1 } } ?: select2 { foo { w2 } } ?: throw RuntimeException() } catch (t: Throwable) { throw RuntimeException() } }