Browse Source

+ implement tcasenode.pass_typecheck

git-svn-id: trunk@26644 -
florian 11 years ago
parent
commit
fbcfb63826
1 changed files with 11 additions and 0 deletions
  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;