// SKIP_TXT interface Additional interface A : Additional fun aOf(): A = TODO() interface B fun B.convert(): A = TODO() fun foo1(x: B): Any { return if (x.hashCode() == 0) aOf() else x.convert() } fun foo2(x: B): Additional { return if (x.hashCode() == 0) aOf() else x.convert() } fun foo3(x: B): Any { return when { x.hashCode() == 0 -> aOf() else -> x.convert() } } fun foo4(x: B): Additional { return when { x.hashCode() == 0 -> aOf() else -> x.convert() } } fun foo5(x: B): Any { return if (x.hashCode() == 0) { aOf() } else { x.convert() } } fun foo6(x: B): Additional { return if (x.hashCode() == 0) { aOf() } else { x.convert() } } fun foo7(x: B): Any { return when { x.hashCode() == 0 -> { aOf() } else -> { x.convert() } } } fun foo8(x: B): Additional { return when { x.hashCode() == 0 -> { aOf() } else -> { x.convert() } } }