scope: the `else` of the assert is a scoped block
authorJean Privat <jean@pryen.org>
Sun, 31 May 2015 01:45:33 +0000 (21:45 -0400)
committerJean Privat <jean@pryen.org>
Sun, 31 May 2015 01:45:33 +0000 (21:45 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/semantize/scope.nit

index 4ea5f27..a69c57a 100644 (file)
@@ -429,6 +429,14 @@ redef class AWithExpr
        end
 end
 
+redef class AAssertExpr
+       redef fun accept_scope_visitor(v)
+       do
+               v.enter_visit(n_expr)
+               v.enter_visit_block(n_else, null)
+       end
+end
+
 redef class AVarFormExpr
        # The associated variable
        var variable: nullable Variable