Просмотр исходного кода

* 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 10 месяцев назад
Родитель
Сommit
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;