Skip to content

Commit 43a168a

Browse files
author
Brian King
committed
Do not generate warning when recording the override for a func_decl contained in a variable
1 parent 92a3887 commit 43a168a

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
@@ -6101,7 +6101,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
61016101
// it is in the same module, update the vtable.
61026102
if (auto *baseDecl = dyn_cast<ClassDecl>(base->getDeclContext())) {
61036103
if (baseDecl->hasKnownSwiftImplementation() &&
6104-
!base->isDynamic() &&
6104+
!base->isDynamic() && !isKnownObjC &&
61056105
override->getDeclContext()->isExtensionContext()) {
61066106
// For compatibility, only generate a warning in Swift 3
61076107
TC.diagnose(override, (TC.Context.isSwiftVersion3()

0 commit comments

Comments
 (0)