fix printing for inout type with nullability

This commit is contained in:
Tongjie Wang
2022-06-14 11:20:19 -07:00
parent 705e562aa1
commit 0505266ef7
3 changed files with 20 additions and 1 deletions

View File

@@ -85,7 +85,8 @@ public:
os << knownTypeInfo->name;
if (knownTypeInfo->canBeNullable) {
printNullability(optionalKind);
} else if (isInOutParam) {
}
if (isInOutParam) {
os << (languageMode == swift::OutputLanguageMode::Cxx ? " &" : " *");
}
return true;