From: NeilBrown Date: Mon, 13 Oct 2014 01:17:37 +0000 (+1100) Subject: oceani: propagate_types should ignore NULL better. X-Git-Tag: FallsCreek~1 X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=eb37cc0a20d133a2ada42442ce1901cf438503d5 oceani: propagate_types should ignore NULL better. A 'NULL' is an empty statement (e.g. 'skip') or something else that is expected to be absent, like the left-hand-side of a unary operator. So report that it returns Vnone, but don't worry about what is expected. Signed-off-by: NeilBrown --- diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index 972f796..e6283e4 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -624,11 +624,8 @@ found, and `2` when any change is made. If it remains unchanged at { enum vtype t; - if (!prog) { - if (type != Vunknown && type != Vnone) - *ok = 0; + if (!prog) return Vnone; - } switch (prog->type) { case Xbinode: