Просмотр исходного кода

Also fix semantics_visitor for new return

Yentl Van Tendeloo 8 лет назад
Родитель
Сommit
46762f42bd
1 измененных файлов с 1 добавлено и 1 удалено
  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: