Skip to content

Commit d49b53d

Browse files
committed
Handle nullability for classes
1 parent bd05325 commit d49b53d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cpp/src/ice2slice/Gen.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,13 @@ namespace
164164
}
165165
else if (auto interface = dynamic_pointer_cast<InterfaceDecl>(type))
166166
{
167+
// Proxys are always mapped to nullable types.
167168
os << getUnqualified(interface, scope) << "Proxy?";
168-
return os.str();
169+
}
170+
else if (ClassDeclPtr cl = dynamic_pointer_cast<ClassDecl>(type))
171+
{
172+
// Classes are always mapped to nullable types.
173+
os << getUnqualified(cl, scope) << "?";
169174
}
170175
else if (ContainedPtr contained = dynamic_pointer_cast<Contained>(type))
171176
{

0 commit comments

Comments
 (0)