File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -131,13 +131,17 @@ extension GenericArgumentClauseSyntax: TypeSyntaxSupportingGenerics {
131131 newArgument = type. erasingGenericTypes ( genericTypes)
132132 default : continue
133133 }
134+ let newArgumentElement = GenericArgumentSyntax (
135+ argument: . type( newArgument) ,
136+ trailingComma: argumentElement. trailingComma
137+ )
134138 #else
135139 let newArgument : TypeSyntax = argumentElement. argument. erasingGenericTypes ( genericTypes)
140+ let newArgumentElement = GenericArgumentSyntax (
141+ argument: newArgument,
142+ trailingComma: argumentElement. trailingComma
143+ )
136144 #endif
137- let newArgumentElement = GenericArgumentSyntax (
138- argument: newArgument,
139- trailingComma: argumentElement. trailingComma
140- )
141145 newArgumentElements. append ( newArgumentElement)
142146 }
143147
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ struct ClosureFactory {
4848 } ,
4949 effectSpecifiers: TypeEffectSpecifiersSyntax (
5050 asyncSpecifier: functionSignature. effectSpecifiers? . asyncSpecifier,
51- throwsSpecifier : functionSignature. effectSpecifiers? . throwsSpecifier
51+ throwsClause : functionSignature. effectSpecifiers? . throwsClause
5252 ) ,
5353 returnClause: returnClause
5454 )
@@ -166,7 +166,7 @@ struct ClosureFactory {
166166 expression = AwaitExprSyntax ( expression: expression)
167167 }
168168
169- if functionSignature. effectSpecifiers? . throwsSpecifier != nil {
169+ if functionSignature. effectSpecifiers? . throwsClause ? . throwsSpecifier != nil {
170170 expression = TryExprSyntax ( expression: expression)
171171 }
172172
@@ -189,7 +189,7 @@ struct ClosureFactory {
189189extension FunctionParameterListSyntax . Element {
190190 fileprivate var isInoutParameter : Bool {
191191 if let attributedType = self . type. as ( AttributedTypeSyntax . self) ,
192- attributedType. specifier ? . text == TokenSyntax . keyword ( . inout) . text
192+ attributedType. specifiers . first ? . firstToken ( viewMode : . all ) ? . text == TokenSyntax . keyword ( . inout) . text
193193 {
194194 return true
195195 } else {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ struct FunctionImplementationFactory {
8787 )
8888 }
8989
90- if protocolFunctionDeclaration. signature. effectSpecifiers? . throwsSpecifier != nil {
90+ if protocolFunctionDeclaration. signature. effectSpecifiers? . throwsClause ? . throwsSpecifier != nil {
9191 throwableErrorFactory. throwErrorExpression ( variablePrefix: variablePrefix)
9292 }
9393
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ struct SpyFactory {
158158 )
159159 }
160160
161- if functionDeclaration. signature. effectSpecifiers? . throwsSpecifier != nil {
161+ if functionDeclaration. signature. effectSpecifiers? . throwsClause ? . throwsSpecifier != nil {
162162 try throwableErrorFactory. variableDeclaration ( variablePrefix: variablePrefix)
163163 }
164164
You can’t perform that action at this time.
0 commit comments