Skip to content

Commit c08b0ed

Browse files
authored
Merge pull request #146 from Matejkob/create-pull-request/patch
2 parents ed93fe6 + 7ab21a2 commit c08b0ed

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Sources/SpyableMacro/Factories/FunctionImplementationFactory.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ struct FunctionImplementationFactory {
8888
}
8989

9090
#if canImport(SwiftSyntax600)
91-
let throwsSpecifier = protocolFunctionDeclaration.signature.effectSpecifiers?.throwsClause?.throwsSpecifier
91+
let throwsSpecifier = protocolFunctionDeclaration.signature.effectSpecifiers?.throwsClause?
92+
.throwsSpecifier
9293
#else
93-
let throwsSpecifier = protocolFunctionDeclaration.signature.effectSpecifiers?.throwsSpecifier
94+
let throwsSpecifier = protocolFunctionDeclaration.signature.effectSpecifiers?
95+
.throwsSpecifier
9496
#endif
9597

9698
if throwsSpecifier != nil {

Sources/SpyableMacro/Factories/SpyFactory.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,10 @@ struct SpyFactory {
157157
parameterList: parameterList
158158
)
159159
}
160-
160+
161161
#if canImport(SwiftSyntax600)
162-
let throwsSpecifier = functionDeclaration.signature.effectSpecifiers?.throwsClause?.throwsSpecifier
162+
let throwsSpecifier = functionDeclaration.signature.effectSpecifiers?.throwsClause?
163+
.throwsSpecifier
163164
#else
164165
let throwsSpecifier = functionDeclaration.signature.effectSpecifiers?.throwsSpecifier
165166
#endif

0 commit comments

Comments
 (0)