Browse Source

* also allow Delphi-style specializations when parsing nested types

Sven/Sarah Barth 1 week ago
parent
commit
923bddabc8
1 changed files with 5 additions and 1 deletions
  1. 5 1
      compiler/ptype.pas

+ 5 - 1
compiler/ptype.pas

@@ -295,7 +295,11 @@ implementation
                      symtablestack.pop(tabstractrecorddef(def).symtable);
                      symtablestack.pop(tabstractrecorddef(def).symtable);
                      symtablestack.free;
                      symtablestack.free;
                      symtablestack:=oldsymtablestack;
                      symtablestack:=oldsymtablestack;
-                     if isspecialize then
+                     if isspecialize or
+                         (
+                           (m_delphi in current_settings.modeswitches) and
+                           (token=_LSHARPBRACKET)
+                         ) then
                        begin
                        begin
                          if not allowspecialization then
                          if not allowspecialization then
                            Message(parser_e_no_local_para_def);
                            Message(parser_e_no_local_para_def);