Переглянути джерело

* 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 9 місяців тому
батько
коміт
8450d4f5e7
1 змінених файлів з 4 додано та 0 видалено
  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;