@@ -313,13 +313,13 @@ extension TypeWrapperMacro: MemberMacro {
313313 attachedTo decl: DeclSyntax ,
314314 in context: inout MacroExpansionContext
315315 ) throws -> [ DeclSyntax ] {
316- let storageVariable : VariableDeclSyntax =
316+ let storageVariable : DeclSyntax =
317317 """
318318 private var _storage = _Storage()
319319 """
320320
321321 return [
322- DeclSyntax ( storageVariable) ,
322+ storageVariable,
323323 ]
324324 }
325325}
@@ -355,17 +355,17 @@ public struct AddMembers: MemberMacro {
355355 attachedTo decl: DeclSyntax ,
356356 in context: inout MacroExpansionContext
357357 ) throws -> [ DeclSyntax ] {
358- let storageStruct : StructDeclSyntax =
358+ let storageStruct : DeclSyntax =
359359 """
360360 struct Storage {}
361361 """
362362
363- let storageVariable : VariableDeclSyntax =
363+ let storageVariable : DeclSyntax =
364364 """
365365 private var storage = Storage()
366366 """
367367
368- let instanceMethod : FunctionDeclSyntax =
368+ let instanceMethod : DeclSyntax =
369369 """
370370 func getStorage() -> Storage {
371371 print( " synthesized method " )
@@ -374,9 +374,9 @@ public struct AddMembers: MemberMacro {
374374 """
375375
376376 return [
377- DeclSyntax ( storageStruct) ,
378- DeclSyntax ( storageVariable) ,
379- DeclSyntax ( instanceMethod) ,
377+ storageStruct,
378+ storageVariable,
379+ instanceMethod,
380380 ]
381381 }
382382}
0 commit comments