소스 검색

Also fix semantics_visitor for new return

Yentl Van Tendeloo 8 년 전
부모
커밋
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: