mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
A generic class can inherit from objc and so the devirtualizer needs to emit a default case
rdar://23228386
This commit is contained in:
@@ -220,8 +220,7 @@ static bool isDefaultCaseKnown(ClassHierarchyAnalysis *CHA,
|
||||
// If the class has an @objc ancestry it can be dynamically subclassed and we
|
||||
// can't therefore statically know the default case.
|
||||
auto Ancestry = CD->checkObjCAncestry();
|
||||
if (Ancestry != ObjCClassKind::NonObjC &&
|
||||
Ancestry != ObjCClassKind::ObjCMembers)
|
||||
if (Ancestry != ObjCClassKind::NonObjC)
|
||||
return false;
|
||||
|
||||
// Without an associated context we cannot perform any
|
||||
|
||||
Reference in New Issue
Block a user