// FIR_IDENTICAL // SKIP_TXT fun select(vararg x: X): X = x[0] fun myOut(): Out = TODO() interface Out fun foo(x: Int, o: Out, oNullable: Out?) { val y: Out<*> = when { x > 0 -> when { x == 1 -> o // Once elvis is being analyzed with expected type Out<*>, because of the @Exact annotation it sticks to that type // While here, it's better to use the Out type from the main branch else -> oNullable ?: myOut() } else -> myOut() } }