Skip to content

Commit d955b16

Browse files
authored
Merge pull request #65292 from DougGregor/top-level-aux-without-extensions-5.9
2 parents a1ed90e + 19f367c commit d955b16

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/AST/Module.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4072,7 +4072,8 @@ void FileUnit::getTopLevelDeclsWithAuxiliaryDecls(
40724072
getTopLevelDecls(nonExpandedDecls);
40734073
for (auto *decl : nonExpandedDecls) {
40744074
decl->visitAuxiliaryDecls([&](Decl *auxDecl) {
4075-
results.push_back(auxDecl);
4075+
if (!isa<ExtensionDecl>(auxDecl))
4076+
results.push_back(auxDecl);
40764077
});
40774078
results.push_back(decl);
40784079
}

test/Macros/macro_expand_conformances.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: %target-swift-frontend -swift-version 5 -typecheck -load-plugin-library %t/%target-library-name(MacroDefinition) %s -disable-availability-checking -dump-macro-expansions > %t/expansions-dump.txt 2>&1
66
// RUN: %FileCheck -check-prefix=CHECK-DUMP %s < %t/expansions-dump.txt
77
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -swift-version 5
8-
// RUN: %target-build-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) %s -o %t/main -module-name MacroUser -swift-version 5
8+
// RUN: %target-build-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) %s -o %t/main -module-name MacroUser -swift-version 5 -emit-tbd -emit-tbd-path %t/MacroUser.tbd
99
// RUN: %target-codesign %t/main
1010
// RUN: %target-run %t/main | %FileCheck %s
1111

0 commit comments

Comments
 (0)