diff options
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 975719182e5..4e62239e824 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -1755,6 +1755,7 @@ Slice::Gen::TypesVisitor::visitConstDef(const ConstDefPtr& p) { string name = fixKwd(p->name()); string scoped = p->scoped(); + string scope = p->scope(); string absolute = getAbsolute(scoped); TypePtr type = p->type(); @@ -1765,7 +1766,7 @@ Slice::Gen::TypesVisitor::visitConstDef(const ConstDefPtr& p) Output& out = output(); out << sp << nl << "public interface " << name; out << sb; - out << nl << typeToString(type, TypeModeIn, scoped) << " value = "; + out << nl << typeToString(type, TypeModeIn, scope) << " value = "; BuiltinPtr bp; EnumPtr ep; @@ -1846,7 +1847,7 @@ Slice::Gen::TypesVisitor::visitConstDef(const ConstDefPtr& p) } else if(ep = EnumPtr::dynamicCast(type)) { - out << fixKwd(p->value()); + out << getAbsolute(ep->scoped(), scope) << '.' << fixKwd(p->value()); } else { |