Procházet zdrojové kódy

* fix #40993: "inherit" the default RTTI options of a non-System unit from TObject as that picks up whatever had been declared in the System unit

Sven/Sarah Barth před 10 měsíci
rodič
revize
8450d4f5e7
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      compiler/pmodules.pas

+ 4 - 0
compiler/pmodules.pas

@@ -370,6 +370,10 @@ implementation
           if ([m_objfpc,m_delphi] * current_settings.modeswitches)<>[] then
             if is_systemunit_unicode then
               Include(current_settings.modeswitches,m_default_unicodestring);
+
+        { default the extended RTTI options to that of TObject }
+        if assigned(class_tobject) then
+          current_module.rtti_directive.options:=class_tobject.rtti.options;
       end;