Browse Source

* reset oo_is_forward object option for external classes after parsing the parent classes

Sven/Sarah Barth 7 months ago
parent
commit
de8d54cfef
1 changed files with 7 additions and 1 deletions
  1. 7 1
      compiler/pdecobj.pas

+ 7 - 1
compiler/pdecobj.pas

@@ -1530,7 +1530,9 @@ implementation
 
 
             { include always the forward flag, it'll be removed once the whole
             { include always the forward flag, it'll be removed once the whole
               class has been parsed so that it can be used as a parent class
               class has been parsed so that it can be used as a parent class
-              of a nested class }
+              of a nested class;
+              Exception: for external classes this will be removed once the
+              parent classes have been parsed }
             include(current_structdef.objectoptions,oo_is_forward);
             include(current_structdef.objectoptions,oo_is_forward);
 
 
             if (cs_compilesystem in current_settings.moduleswitches) then
             if (cs_compilesystem in current_settings.moduleswitches) then
@@ -1676,6 +1678,10 @@ implementation
                 (helpertype=ht_record)) then
                 (helpertype=ht_record)) then
               parse_parent_classes;
               parse_parent_classes;
 
 
+            { for external classes we remove the external flag here already }
+            if oo_is_external in current_objectdef.objectoptions then
+              exclude(current_objectdef.objectoptions,oo_is_forward);
+
             { parse extended type for helpers }
             { parse extended type for helpers }
             if is_objectpascal_helper(current_structdef) then
             if is_objectpascal_helper(current_structdef) then
               parse_extended_type(helpertype);
               parse_extended_type(helpertype);