Browse Source

* fixed regression caused by r7180

git-svn-id: trunk@7555 -
florian 18 years ago
parent
commit
36471608c1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/pdecsub.pas

+ 3 - 1
compiler/pdecsub.pas

@@ -1096,7 +1096,9 @@ implementation
                 end;
                 end;
             end;
             end;
         end;
         end;
-        if pd.returndef.typ=filedef then
+        { file types can't be function results }
+        if assigned(pd) and
+           (pd.returndef.typ=filedef) then
           message(parser_e_illegal_function_result);
           message(parser_e_illegal_function_result);
         { support procedure proc stdcall export; }
         { support procedure proc stdcall export; }
         if not(check_proc_directive(false)) then
         if not(check_proc_directive(false)) then