diff options
author | Jose <jose@zeroc.com> | 2019-05-07 22:29:43 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-05-07 22:38:53 +0200 |
commit | 5d554d64d3c29580c009ae973212a33a189a9127 (patch) | |
tree | 499a45b1b04fcb4e9f81720ddedb816c269d1c95 /cpp/src/slice2swift/Gen.cpp | |
parent | Fix ref counting issue with TypeId resolver (diff) | |
download | ice-5d554d64d3c29580c009ae973212a33a189a9127.tar.bz2 ice-5d554d64d3c29580c009ae973212a33a189a9127.tar.xz ice-5d554d64d3c29580c009ae973212a33a189a9127.zip |
Add support for "swift:attribute" and @discardableResult
c# modified: swift/test/Ice/slicing/exceptions/ServerAMD.swift
Diffstat (limited to 'cpp/src/slice2swift/Gen.cpp')
-rw-r--r-- | cpp/src/slice2swift/Gen.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp index 4c86f427b1b..fdbf9974637 100644 --- a/cpp/src/slice2swift/Gen.cpp +++ b/cpp/src/slice2swift/Gen.cpp @@ -363,6 +363,7 @@ Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) } out << sp; + writeSwiftAttributes(out, p->getMetaData()); out << nl << "open class " << fixIdent(name) << ": "; if(base) { @@ -505,6 +506,7 @@ Gen::TypesVisitor::visitStructStart(const StructPtr& p) bool isClass = containsClassMembers(p); out << sp; + writeSwiftAttributes(out, p->getMetaData()); out << nl << "public " << (isClass ? "class " : "struct ") << name; if(legalKeyType) { @@ -860,6 +862,7 @@ Gen::TypesVisitor::visitEnum(const EnumPtr& p) const string optionalFormat = getOptionalFormat(p); out << sp; + writeSwiftAttributes(out, p->getMetaData()); out << nl << "public enum " << name << ": " << enumType; out << sb; @@ -1161,6 +1164,7 @@ Gen::ValueVisitor::visitClassDefStart(const ClassDefPtr& p) out << eb; out << sp; + writeSwiftAttributes(out, p->getMetaData()); out << nl << "open class " << fixIdent(name) << ": "; if(base) { @@ -1678,6 +1682,7 @@ Gen::LocalObjectVisitor::visitOperation(const OperationPtr& p) int typeCtx = TypeContextInParam | TypeContextLocal; out << sp; + writeSwiftAttributes(out, p->getMetaData()); out << nl << "func " << name; out << spar; for(ParamDeclList::const_iterator i = inParams.begin(); i != inParams.end(); ++i) |