typing: AForBlock propagates error to the main AForExpr
authorJean Privat <jean@pryen.org>
Sat, 7 Nov 2015 03:42:40 +0000 (22:42 -0500)
committerJean Privat <jean@pryen.org>
Sat, 7 Nov 2015 03:42:40 +0000 (22:42 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/semantize/typing.nit

index 8a23a73..a6af9ba 100644 (file)
@@ -1134,6 +1134,7 @@ redef class AForExpr
                        var mtype = v.visit_expr(g.n_expr)
                        if mtype == null then return
                        g.do_type_iterator(v, mtype)
+                       if g.is_broken then is_broken = true
                end
 
                v.visit_stmt(n_block)