Skip to content

Commit 537e126

Browse files
authored
Merge pull request #40821 from DougGregor/missing-inherited-conformance-5.6
2 parents f1d2986 + f21a3e1 commit 537e126

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

lib/AST/ConformanceLookupTable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,8 @@ ConformanceLookupTable::getConformance(NominalTypeDecl *nominal,
851851

852852
// Look up the inherited conformance.
853853
ModuleDecl *module = entry->getDeclContext()->getParentModule();
854-
auto inheritedConformance = module->lookupConformance(superclassTy,
855-
protocol);
854+
auto inheritedConformance = module->lookupConformance(
855+
superclassTy, protocol, /*allowMissing=*/true);
856856

857857
// Form the inherited conformance.
858858
entry->Conformance =

lib/AST/Module.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,8 @@ LookupConformanceInModuleRequest::evaluate(
13361336
auto superclassTy = type->getSuperclassForDecl(conformingClass);
13371337

13381338
// Compute the conformance for the inherited type.
1339-
auto inheritedConformance = mod->lookupConformance(superclassTy, protocol);
1339+
auto inheritedConformance = mod->lookupConformance(
1340+
superclassTy, protocol, /*allowMissing=*/true);
13401341
assert(inheritedConformance &&
13411342
"We already found the inherited conformance");
13421343

test/Concurrency/sendable_conformance_checking.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,8 @@ actor A10: AsyncThrowingProtocolWithNotSendable {
145145
}
146146
}
147147
}
148+
149+
// rdar://86653457 - Crash due to missing Sendable conformances.
150+
class Klass<Output: Sendable>: Sendable {}
151+
final class SubKlass: Klass<[S]> {}
152+
public struct S {}

0 commit comments

Comments
 (0)