diff options
author | Bernard Normier <bernard@zeroc.com> | 2012-08-17 11:13:01 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2012-08-17 11:13:01 -0400 |
commit | 3fe781fb60515fa7c8152ee194234e1884aaf6d7 (patch) | |
tree | 25f106792c77ca53a9eb754d8c1a751d20d3c747 /cpp/src/slice2cpp | |
parent | Fixed bug #ICE-4844 (diff) | |
download | ice-3fe781fb60515fa7c8152ee194234e1884aaf6d7.tar.bz2 ice-3fe781fb60515fa7c8152ee194234e1884aaf6d7.tar.xz ice-3fe781fb60515fa7c8152ee194234e1884aaf6d7.zip |
Fixed bug #ICE-4360: slice2cpp no longer generates ProxyType resp. PointerType when the enclosing class [Slice class / interface] has the same name.
Diffstat (limited to 'cpp/src/slice2cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 7aefe066ea3..0d8517d42d2 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3397,11 +3397,18 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) H << nl << "public:" << sp; H.inc(); - if(!p->isLocal()) + // + // In C++, a nested type cannot have the same name as the enclosing type + // + if(!p->isLocal() && p->name() != "ProxyType") { H << nl << "typedef " << p->name() << "Prx ProxyType;"; } - H << nl << "typedef " << p->name() << "Ptr PointerType;"; + + if(p->name() != "PointerType") + { + H << nl << "typedef " << p->name() << "Ptr PointerType;"; + } vector<string> params; vector<string> allTypes; |