Skip to content

Commit f9b2b70

Browse files
committed
remove error
1 parent a5cae2c commit f9b2b70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

macros/Extensions/ExtensionDeclSyntax+init.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import SwiftSyntax
22
import SwiftSyntaxBuilder
33

44
extension ExtensionDeclSyntax {
5-
init(extending extendedType: TypeSyntaxProtocol, inheritsTypes inheritedTypes: [TokenSyntax] = [], @MemberBlockItemListBuilder _ itemsBuilder: () throws -> MemberBlockItemListSyntax) throws {
5+
init(extending extendedType: TypeSyntaxProtocol, inheritsTypes inheritedTypes: [TokenSyntax] = [], @MemberBlockItemListBuilder _ itemsBuilder: () throws -> MemberBlockItemListSyntax) rethrows {
66
try self.init(
77
extendedType: extendedType,
88
inheritanceClause: InheritanceClauseSyntax {

macros/Macros/ToolMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public struct ToolMacro: ExtensionMacro {
4343
try addFunction(reading: functionDecl, and: functionDocString)
4444
},
4545
]
46-
} withDefault: { [] }
46+
} withDefault: { [ExtensionDeclSyntax(extending: type, inheritsTypes: ["Toolable"]) {}] }
4747
}
4848

4949
private static func getFunctionDeclaration(from structDecl: StructDeclSyntax) throws -> FunctionDeclSyntax {

0 commit comments

Comments
 (0)