Explorar o código

* ensure that sto_has_generic is set when a generic routine has been parsed

git-svn-id: trunk@39230 -
svenbarth %!s(int64=7) %!d(string=hai) anos
pai
achega
5510b13975
Modificáronse 3 ficheiros con 12 adicións e 1 borrados
  1. 3 0
      compiler/pdecobj.pas
  2. 3 0
      compiler/pdecsub.pas
  3. 6 1
      compiler/psub.pas

+ 3 - 0
compiler/pdecobj.pas

@@ -936,6 +936,9 @@ implementation
                   if (po_virtualmethod in result.procoptions) then
                     include(astruct.objectoptions,oo_has_virtual);
 
+                  if result.is_generic then
+                    astruct.symtable.includeoption(sto_has_generic);
+
                   chkcpp(result);
                   chkobjc(result);
                   chkjava(result);

+ 3 - 0
compiler/pdecsub.pas

@@ -1682,6 +1682,9 @@ implementation
 
             { add definition to procsym }
             proc_add_definition(result);
+
+            if result.is_generic then
+              astruct.symtable.includeoption(sto_has_generic);
           end;
 
         maybe_parse_hint_directives(result);

+ 6 - 1
compiler/psub.pas

@@ -2222,7 +2222,12 @@ implementation
                  begin
                    MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,pd.fullprocname(false));
                    tprocsym(pd.procsym).write_parameter_lists(pd);
-                 end;
+                 end
+                else
+                  begin
+                    if pd.is_generic and not assigned(pd.struct) then
+                      tprocsym(pd.procsym).owner.includeoption(sto_has_generic);
+                  end;
               end;
            end;