compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt (6 lines of code) (raw):

fun foo(i: Int, j: Int?): String = when (i) { j -> "OK" else -> "Fail" } fun box(): String = foo(0, 0)