Control-Flow: Generate instruction for left-hand side of invalid assignments

#KT-8390 Fixed
This commit is contained in:
Alexey Sedunov
2015-07-10 02:33:08 +03:00
parent d2dc44379e
commit df07a61a08
8 changed files with 43 additions and 39 deletions
@@ -6,13 +6,15 @@ fun foo() {
L0:
1 <START>
2 mark({ x = "" })
magic[UNRESOLVED_CALL](x) -> <v0>
magic[VALUE_CONSUMER](x|<v0>) -> <v1>
mark("")
r("") -> <v0>
magic[UNSUPPORTED_ELEMENT](x = ""|<v0>) -> <v1>
r("") -> <v2>
w(x|<v2>)
L1:
1 <END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
<SINK> PREV:[<ERROR>, <END>]
=====================