@retroactive conformance syntax and checking (#36068)

This commit is contained in:
Harlan Haskins
2023-10-20 14:27:03 -07:00
committed by GitHub
parent f1bec99705
commit 4ac34a40ea
46 changed files with 493 additions and 65 deletions

View File

@@ -736,7 +736,8 @@ public:
// Create a synthesized ExtensionDecl for the conformance.
ASTContext &ctx = M->getASTContext();
auto inherits = ctx.AllocateCopy(llvm::makeArrayRef(InheritedEntry(
TypeLoc::withoutLoc(proto->getDeclaredInterfaceType()), isUnchecked)));
TypeLoc::withoutLoc(proto->getDeclaredInterfaceType()), isUnchecked,
/*isRetroactive=*/false)));
auto extension =
ExtensionDecl::create(ctx, SourceLoc(), nullptr, inherits,
nominal->getModuleScopeContext(), nullptr);