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

* Fixed RTTI name mangling for nested types, resolves #26069.

git-svn-id: trunk@28958 -
sergei 10 лет назад
Родитель
Сommit
07ab3fbec4
3 измененных файлов с 25 добавлено и 1 удалено
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/symdef.pas
  3. 23 0
      tests/webtbs/tw26069.pp

+ 1 - 0
.gitattributes

@@ -14073,6 +14073,7 @@ tests/webtbs/tw2595.pp svneol=native#text/plain
 tests/webtbs/tw25956.pp svneol=native#text/pascal
 tests/webtbs/tw25956.pp svneol=native#text/pascal
 tests/webtbs/tw25959.pp svneol=native#text/pascal
 tests/webtbs/tw25959.pp svneol=native#text/pascal
 tests/webtbs/tw2602.pp svneol=native#text/plain
 tests/webtbs/tw2602.pp svneol=native#text/plain
+tests/webtbs/tw26069.pp svneol=native#text/plain
 tests/webtbs/tw2607.pp svneol=native#text/plain
 tests/webtbs/tw2607.pp svneol=native#text/plain
 tests/webtbs/tw26123.pp svneol=native#text/pascal
 tests/webtbs/tw26123.pp svneol=native#text/pascal
 tests/webtbs/tw26162.pp svneol=native#text/pascal
 tests/webtbs/tw26162.pp svneol=native#text/pascal

+ 1 - 1
compiler/symdef.pas

@@ -1777,7 +1777,7 @@ implementation
           end;
           end;
         if assigned(typesym) and
         if assigned(typesym) and
            (owner.symtabletype in [staticsymtable,globalsymtable]) then
            (owner.symtabletype in [staticsymtable,globalsymtable]) then
-          result:=make_mangledname(prefix,owner,typesym.name)
+          result:=make_mangledname(prefix,typesym.owner,typesym.name)
         else
         else
           result:=make_mangledname(prefix,findunitsymtable(owner),'DEF'+tostr(DefId))
           result:=make_mangledname(prefix,findunitsymtable(owner),'DEF'+tostr(DefId))
       end;
       end;

+ 23 - 0
tests/webtbs/tw26069.pp

@@ -0,0 +1,23 @@
+{ %norun }
+Unit tw26069;
+
+{$mode delphi}
+
+Interface
+
+Type
+  TClass1 = Class
+  Type
+    TReason = (rnOne, rnTwo);
+  End;
+
+  TClass2 = Class
+  Type
+    TReason = (rn1, rn2);
+  End;
+
+
+Implementation
+
+End.
+