Skip to content

Commit d4bb649

Browse files
committed
[Type checker] Only check hasSuperclass() when that's all we care about
1 parent 4820d16 commit d4bb649

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5613,7 +5613,7 @@ void TypeChecker::defineDefaultConstructor(NominalTypeDecl *decl) {
56135613
if (auto *classDecl = dyn_cast<ClassDecl>(decl)) {
56145614
// If the class has a superclass, we should have either inherited it's
56155615
// designated initializers or diagnosed the absence of our own.
5616-
if (classDecl->getSuperclass())
5616+
if (classDecl->hasSuperclass())
56175617
return;
56185618
}
56195619

0 commit comments

Comments
 (0)