Explorar el Código

Also fix semantics_visitor for new return

Yentl Van Tendeloo hace 8 años
padre
commit
46762f42bd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      interface/HUTN/hutn_compiler/semantics_visitor.py

+ 1 - 1
interface/HUTN/hutn_compiler/semantics_visitor.py

@@ -96,7 +96,7 @@ class SemanticsVisitor(Visitor):
     def check_return(self, tree):
         l = self.current_funcdecl
 
-        if len(tree.get_tail()) > 1:
+        if len(tree.get_tail()) > 2:
             r = tree.get_tail()[1]
             r_type = None
         else: