]> ocean-lang.org Git - ocean/commitdiff
oceani: propagate_types should ignore NULL better.
authorNeilBrown <neil@brown.name>
Mon, 13 Oct 2014 01:17:37 +0000 (12:17 +1100)
committerNeilBrown <neil@brown.name>
Mon, 13 Oct 2014 01:17:37 +0000 (12:17 +1100)
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 <neil@brown.name>
csrc/oceani.mdc

index 972f7964e21e43b5c76aa78e50895e244796b49d..e6283e4a5d28745f4ab734706f17e211d959731f 100644 (file)
@@ -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: