Skip to content

Commit

Permalink
fix: type error leading to warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
elihwyma committed Nov 24, 2024
1 parent 09dc8ac commit 540e1c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/PugiSwiftMacros/SimpleTypeMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public struct SimpleTypeMacro: ExtensionMacro {
throw MacroError("\(structDecl.identifier) must conform to one of the following protocols: NumericRestriction, FloatingRestrictions, StringRestrictions, ListRestrictions")
}

var genericInitFunction = NodeMacro.createFunction(with: structDecl.accessLevel, name: "attribute", type: "PugiSwift.XMLAttribute")
var genericInitFunction = NodeMacro.createFunction(with: structDecl.accessLevel, name: "attribute", type: "(any AttributeProtocol)?")
let genericInitCode = CodeBlockItemSyntax(
"""
self.rawValue = try .init(from: attribute)
Expand Down

0 comments on commit 540e1c9

Please sign in to comment.