Browse Source

* also add a generic dummy symbol to the current module's dummy symbols after it had been parsed

git-svn-id: trunk@36467 -
svenbarth 8 years ago
parent
commit
68c5f45593
1 changed files with 11 additions and 4 deletions
  1. 11 4
      compiler/pdecl.pas

+ 11 - 4
compiler/pdecl.pas

@@ -633,9 +633,12 @@ implementation
                     if not (m_delphi in current_settings.modeswitches) then
                       Message1(sym_e_duplicate_id,genorgtypename)
                     else
-                      { we need to find this symbol even if it's a variable or
-                        something else when doing an inline specialization }
-                      Include(sym.symoptions,sp_generic_dummy);
+                      begin
+                        { we need to find this symbol even if it's a variable or
+                          something else when doing an inline specialization }
+                        Include(sym.symoptions,sp_generic_dummy);
+                        add_generic_dummysym(sym);
+                      end;
                 end
               else
                 begin
@@ -724,7 +727,11 @@ implementation
                         current_module.checkforwarddefs.add(hdef);
                     end;
                   if not assigned(hdef.typesym) then
-                    hdef.typesym:=newtype;
+                    begin
+                      hdef.typesym:=newtype;
+                      if sp_generic_dummy in newtype.symoptions then
+                        add_generic_dummysym(newtype);
+                    end;
                 end;
               { in non-Delphi modes we need a reference to the generic def
                 without the generic suffix, so it can be found easily when