File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,8 @@ public func assertMacro(
204204 var expandedSourceFile = origSourceFile. expand (
205205 macros: macros,
206206 contextGenerator: { syntax in
207- BasicMacroExpansionContext ( sharingWith: context, lexicalContext: syntax. allMacroLexicalContexts ( ) )
207+ BasicMacroExpansionContext (
208+ sharingWith: context, lexicalContext: syntax. allMacroLexicalContexts ( ) )
208209 } ,
209210 indentationWidth: indentationWidth
210211 )
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ final class EntryMacroTests: BaseTestCase {
55 override func invokeTest( ) {
66 withMacroTesting (
77 macros: [
8- EntryMacro . self,
8+ EntryMacro . self
99 ]
1010 ) {
1111 super. invokeTest ( )
Original file line number Diff line number Diff line change @@ -9,17 +9,19 @@ public struct EntryMacro: AccessorMacro {
99 in context: some MacroExpansionContext
1010 ) throws -> [ AccessorDeclSyntax ] {
1111 let isInEnvironmentValues = context. lexicalContext. contains { lexicalContext in
12- lexicalContext. as ( ExtensionDeclSyntax . self) ? . extendedType. trimmedDescription == " EnvironmentValues "
12+ lexicalContext. as ( ExtensionDeclSyntax . self) ? . extendedType. trimmedDescription
13+ == " EnvironmentValues "
1314 }
1415
1516 guard isInEnvironmentValues else {
16- throw MacroExpansionErrorMessage ( " '@Entry' macro can only attach to var declarations inside extensions of EnvironmentValues " )
17+ throw MacroExpansionErrorMessage (
18+ " '@Entry' macro can only attach to var declarations inside extensions of EnvironmentValues " )
1719 }
1820
1921 return [
2022 AccessorDeclSyntax ( accessorSpecifier: . keyword( . get) ) {
2123 " fatalError() "
22- } ,
24+ }
2325 ]
2426 }
2527}
You can’t perform that action at this time.
0 commit comments