parallelization_phase: use `ANode::validate` after AST shenanigans.
[nit.git] / src / frontend / parallelization_phase.nit
index e234a02..237eba2 100644 (file)
@@ -22,6 +22,7 @@ private import parser_util
 import modelize
 import astbuilder
 private import annotation
+private import astvalidation
 
 redef class ToolContext
        # Transforms a function annotated with "threaded"
@@ -140,7 +141,10 @@ return thread
                var newbody = toolcontext.parse_something(s_newbody)
                nmethdef.n_block = newbody.as(ABlockExpr)
 
+               nmethdef.validate
+
                # Add the new class to the module
                amod.n_classdefs.add(classdef)
+               classdef.validate
        end
 end