Skip to content

Commit e987d04

Browse files
authored
Merge pull request #9487 from DougGregor/nscoding-objc-interop
2 parents fb77682 + 5a67ecc commit e987d04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6001,7 +6001,8 @@ void TypeChecker::checkConformancesInContext(DeclContext *dc,
60016001
// Diagnose @NSCoding on file/fileprivate/nested/generic classes, which
60026002
// have unstable archival names.
60036003
if (auto classDecl = dc->getAsClassOrClassExtensionContext()) {
6004-
if (isNSCoding(conformance->getProtocol())) {
6004+
if (Context.LangOpts.EnableObjCInterop &&
6005+
isNSCoding(conformance->getProtocol())) {
60056006
// Note: these 'kind' values are synchronized with
60066007
// diag::nscoding_unstable_mangled_name.
60076008
Optional<unsigned> kind;

0 commit comments

Comments
 (0)