Browse Source

* introduction of in_generic in r20699 was unneeded, replaced by parse_generic

git-svn-id: trunk@20858 -
florian 13 years ago
parent
commit
ce845bf97c
3 changed files with 2 additions and 13 deletions
  1. 0 11
      compiler/htypechk.pas
  2. 1 1
      compiler/pdecl.pas
  3. 1 1
      compiler/ptconst.pas

+ 0 - 11
compiler/htypechk.pas

@@ -178,10 +178,6 @@ interface
       arrays, records and objects are checked recursively }
     function is_valid_for_default(def:tdef):boolean;
 
-    { returns true if currently a generic declaration or definition is parsed/compiled,
-      regardless if it's a subroutine or type }
-    function in_generic : boolean;
-
 implementation
 
     uses
@@ -3018,11 +3014,4 @@ implementation
       end;
 
 
-    function in_generic: boolean;
-      begin
-        result:=(assigned(current_structdef) and (df_generic in current_structdef.defoptions)) or
-          (assigned(current_procinfo) and (df_generic in current_procinfo.procdef.defoptions));
-      end;
-
-
 end.

+ 1 - 1
compiler/pdecl.pas

@@ -151,7 +151,7 @@ implementation
                 Message(parser_e_illegal_expression);
              end;
            else
-             if not(in_generic) then
+             if not(parse_generic) then
                Message(parser_e_illegal_expression);
         end;
         current_tokenpos:=storetokenpos;

+ 1 - 1
compiler/ptconst.pas

@@ -173,7 +173,7 @@ implementation
             if is_constnode(n) then
               IncompatibleTypes(n.resultdef, def)
             else
-             if not(in_generic) then
+             if not(parse_generic) then
                 Message(parser_e_illegal_expression);
           end;