Browse Source

* fixed another formal const problem caused by yesterday's changes

florian 21 years ago
parent
commit
ab2b7b3889
1 changed files with 10 additions and 2 deletions
  1. 10 2
      compiler/htypechk.pas

+ 10 - 2
compiler/htypechk.pas

@@ -881,6 +881,11 @@ implementation
                end;
               exit;
             end;
+           if (Valid_Const in opts) and is_constnode(hp) then
+             begin
+               valid_for_assign:=true;
+               exit;
+             end;
            case hp.nodetype of
              temprefn :
                begin
@@ -1088,7 +1093,7 @@ implementation
 
     function  valid_for_formal_const(p : tnode) : boolean;
       begin
-        valid_for_formal_const:=is_constnode(p) or is_procsym_load(p) or (p.resulttype.def.deftype=formaldef) or
+        valid_for_formal_const:=is_procsym_load(p) or (p.resulttype.def.deftype=formaldef) or
           valid_for_assign(p,[valid_void,valid_const,valid_property]);
       end;
 
@@ -1904,7 +1909,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.91  2004-05-24 21:24:40  florian
+  Revision 1.92  2004-05-25 21:27:35  florian
+    * fixed another formal const problem caused by yesterday's changes
+
+  Revision 1.91  2004/05/24 21:24:40  florian
     * properties are allowed as formal const parameters as well
 
   Revision 1.90  2004/05/24 21:04:31  florian