Skip to content

Commit 9d7a4b3

Browse files
committed
[Type checker] Assert that the type checker is around when we need it.
1 parent 599e07e commit 9d7a4b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ static bool diagnoseAvailability(IdentTypeRepr *IdType,
14841484
if (ctx.LangOpts.isSwiftVersion3() && comp != componentRange.back())
14851485
continue;
14861486

1487-
// FIXME: Need to eliminate the type checker argument.
1487+
assert(ctx.getLazyResolver() && "Must have a type checker!");
14881488
TypeChecker &tc = static_cast<TypeChecker &>(*ctx.getLazyResolver());
14891489
if (diagnoseDeclAvailability(typeDecl, tc, DC, comp->getIdLoc(),
14901490
AllowPotentiallyUnavailableProtocol,

0 commit comments

Comments
 (0)