Explorar o código

+ implement tcasenode.pass_typecheck

git-svn-id: trunk@26644 -
florian %!s(int64=11) %!d(string=hai) anos
pai
achega
fbcfb63826
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      compiler/nset.pas

+ 11 - 0
compiler/nset.pas

@@ -638,8 +638,19 @@ implementation
 
 
     function tcasenode.pass_typecheck : tnode;
+      var
+        i : integer;
       begin
         result:=nil;
+
+        do_typecheckpass(left);
+
+        for i:=0 to blocks.count-1 do
+          typecheckpass(pcaseblock(blocks[i])^.statement);
+
+        if assigned(elseblock) then
+          typecheckpass(elseblock);
+
         resultdef:=voidtype;
       end;