Pseudocode: Do not generate VALUE_CONSUMER if property delegate has no value (EA-59276)

This commit is contained in:
Alexey Sedunov
2014-09-01 13:41:44 +04:00
parent e03bae44d9
commit f11621615b
6 changed files with 40 additions and 4 deletions
@@ -0,0 +1,17 @@
== foo ==
val foo: Int by throw NullPointerException()
---------------------
L0:
1 <START>
v(val foo: Int by throw NullPointerException())
mark(throw NullPointerException())
mark(NullPointerException())
call(NullPointerException(), <init>) -> <v0>
throw (throw NullPointerException()|<v0>) NEXT:[<ERROR>]
L1:
<END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[throw (throw NullPointerException()|<v0>)]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
@@ -0,0 +1 @@
val foo: Int by throw NullPointerException()
@@ -0,0 +1,5 @@
== foo ==
val foo: Int by throw NullPointerException()
---------------------
NullPointerException() <v0>: {<: Throwable} NEW: call(NullPointerException(), <init>) -> <v0>
=====================