We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebeb870 commit d56cb4aCopy full SHA for d56cb4a
lib/SIL/IR/SILType.cpp
@@ -88,10 +88,8 @@ SILType SILType::getBuiltinWordType(const ASTContext &C) {
88
}
89
90
SILType SILType::getOptionalType(SILType type) {
91
- auto &ctx = type.getASTContext();
92
- auto optType = BoundGenericEnumType::get(ctx.getOptionalDecl(), Type(),
93
- { type.getASTType() });
94
- return getPrimitiveType(CanType(optType), type.getCategory())
+ return getPrimitiveType(type.getASTType().wrapInOptionalType(),
+ type.getCategory())
95
.copyingMoveOnlyWrapper(type);
96
97
0 commit comments