== foo == fun foo(a: Number) { val t = when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null } } --------------------- L0: 1 v(a: Number) magic[FAKE_INITIALIZER](a: Number) -> w(a|) 2 mark({ val t = when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null } }) v(val t = when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }) mark(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }) r(a) -> mark(1 -> "1") mark(1) r(1) -> magic[EQUALS_IN_WHEN_CONDITION](1|, ) -> jmp?(L4|) NEXT:[mark(in Collections.singleton(2) -> "2"), mark("1")] L3: mark("1") r("1") -> jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L4: mark(in Collections.singleton(2) -> "2") PREV:[jmp?(L4|)] mark(Collections.singleton(2)) r(2) -> mark(singleton(2)) call(singleton(2), singleton|) -> mark(in Collections.singleton(2)) call(in Collections.singleton(2), contains|, ) -> jmp?(L6|) NEXT:[mark(is Int -> "Int"), mark("2")] L5: mark("2") r("2") -> jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L6: mark(is Int -> "Int") PREV:[jmp?(L6|)] mark(is Int) magic[IS](is Int|) -> jmp?(L8|) NEXT:[mark(!in Collections.singleton(3) -> "!3"), mark("Int")] L7: mark("Int") r("Int") -> jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L8: mark(!in Collections.singleton(3) -> "!3") PREV:[jmp?(L8|)] mark(Collections.singleton(3)) r(3) -> mark(singleton(3)) call(singleton(3), singleton|) -> mark(!in Collections.singleton(3)) call(!in Collections.singleton(3), contains|, ) -> jmp?(L10|) NEXT:[mark(!is Number -> "!Number"), mark("!3")] L9: mark("!3") r("!3") -> jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L10: mark(!is Number -> "!Number") PREV:[jmp?(L10|)] mark(!is Number) magic[IS](!is Number|) -> jmp?(L12|) NEXT:[mark(else -> null), mark("!Number")] L11: mark("!Number") r("!Number") -> jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> ] L12: mark(else -> null) PREV:[jmp?(L12|)] L13: r(null) -> jmp(L2) L2: merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> PREV:[jmp(L2), jmp(L2), jmp(L2), jmp(L2), jmp(L2), jmp(L2)] w(t|) L1: 1 NEXT:[] error: PREV:[] sink: PREV:[, ] =====================