We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d602dc commit 5746322Copy full SHA for 5746322
lib/Sema/TypeChecker.cpp
@@ -215,11 +215,17 @@ void swift::bindExtensions(ModuleDecl &mod) {
215
if (!SF)
216
continue;
217
218
- for (auto D : SF->getTopLevelDecls()) {
+ auto visitTopLevelDecl = [&](Decl *D) {
219
if (auto ED = dyn_cast<ExtensionDecl>(D))
220
if (!tryBindExtension(ED))
221
- worklist.push_back(ED);
222
- }
+ worklist.push_back(ED);;
+ };
223
+
224
+ for (auto *D : SF->getTopLevelDecls())
225
+ visitTopLevelDecl(D);
226
227
+ for (auto *D : SF->getHoistedDecls())
228
229
}
230
231
// Phase 2 - repeatedly go through the worklist and attempt to bind each
0 commit comments