summaryrefslogtreecommitdiff
path: root/cpp/src/slice2swift/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2swift/Gen.cpp')
-rw-r--r--cpp/src/slice2swift/Gen.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp
index b00cf98f846..7bfda21774e 100644
--- a/cpp/src/slice2swift/Gen.cpp
+++ b/cpp/src/slice2swift/Gen.cpp
@@ -420,23 +420,23 @@ Gen::TypesVisitor::visitStructStart(const StructPtr& p)
void
Gen::TypesVisitor::visitSequence(const SequencePtr& p)
{
- const string name = fixIdent(p->name());
- const TypePtr type = p->type();
+ const string swiftModule = getSwiftModule(getTopLevelModule(ContainedPtr::dynamicCast(p)));
+ const string name = getUnqualified(getAbsolute(p), swiftModule);
out << sp;
- out << nl << "public typealias " << name << " = [" << typeToString(type, p) << "]";
+ out << nl << "public typealias " << name << " = [" << typeToString(p->type(), p) << "]";
}
void
Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
{
- const string name = fixIdent(p->name());
-
- const TypePtr keyType = p->keyType();
- const TypePtr valueType = p->valueType();
+ const string swiftModule = getSwiftModule(getTopLevelModule(ContainedPtr::dynamicCast(p)));
+ const string name = getUnqualified(getAbsolute(p), swiftModule);
out << sp;
- out << nl << "public typealias " << name << " = [" << typeToString(keyType, p) << ":" << typeToString(valueType, p)
+ out << nl << "public typealias " << name << " = ["
+ << typeToString(p->keyType(), p) << ":"
+ << typeToString(p->valueType(), p)
<< "]";
}