From 07ab3fbec4ad661d59a5ebbc97c60673e8654267 Mon Sep 17 00:00:00 2001 From: sergei Date: Sat, 1 Nov 2014 14:54:16 +0000 Subject: [PATCH] * Fixed RTTI name mangling for nested types, resolves #26069. git-svn-id: trunk@28958 - --- .gitattributes | 1 + compiler/symdef.pas | 2 +- tests/webtbs/tw26069.pp | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 tests/webtbs/tw26069.pp diff --git a/.gitattributes b/.gitattributes index 3e18aedb8d..92a29aafa8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14073,6 +14073,7 @@ tests/webtbs/tw2595.pp svneol=native#text/plain tests/webtbs/tw25956.pp svneol=native#text/pascal tests/webtbs/tw25959.pp svneol=native#text/pascal 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/tw26123.pp svneol=native#text/pascal tests/webtbs/tw26162.pp svneol=native#text/pascal diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 9a028f05b8..3c68f7519d 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -1777,7 +1777,7 @@ implementation end; if assigned(typesym) and (owner.symtabletype in [staticsymtable,globalsymtable]) then - result:=make_mangledname(prefix,owner,typesym.name) + result:=make_mangledname(prefix,typesym.owner,typesym.name) else result:=make_mangledname(prefix,findunitsymtable(owner),'DEF'+tostr(DefId)) end; diff --git a/tests/webtbs/tw26069.pp b/tests/webtbs/tw26069.pp new file mode 100644 index 0000000000..95e8130c88 --- /dev/null +++ b/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. +