mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "[Sema] Record opaque type decls for type reconstruction after creation instead of in the parser."
This commit is contained in:
@@ -3485,12 +3485,14 @@ void SourceFile::setTypeRefinementContext(TypeRefinementContext *Root) {
|
||||
}
|
||||
|
||||
ArrayRef<OpaqueTypeDecl *> SourceFile::getOpaqueReturnTypeDecls() {
|
||||
for (auto *opaqueDecl : UnvalidatedOpaqueReturnTypes.takeVector()) {
|
||||
auto inserted = ValidatedOpaqueReturnTypes.insert(
|
||||
{opaqueDecl->getOpaqueReturnTypeIdentifier().str(),
|
||||
opaqueDecl});
|
||||
if (inserted.second) {
|
||||
OpaqueReturnTypes.push_back(opaqueDecl);
|
||||
for (auto *vd : UnvalidatedDeclsWithOpaqueReturnTypes.takeVector()) {
|
||||
if (auto opaqueDecl = vd->getOpaqueResultTypeDecl()) {
|
||||
auto inserted = ValidatedOpaqueReturnTypes.insert(
|
||||
{opaqueDecl->getOpaqueReturnTypeIdentifier().str(),
|
||||
opaqueDecl});
|
||||
if (inserted.second) {
|
||||
OpaqueReturnTypes.push_back(opaqueDecl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user