Skip to content

Commit

Permalink
Removed erronous bug annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBoyBarney committed Feb 17, 2025
1 parent cffab77 commit 2fa89a0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/kdl/builder.cr
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,21 @@ module KDL
end

def node(name : String, *, type : String? = nil, comment : String? = nil)
node name, type: type, comment: comment do
end
node(name, type: type, comment: comment) { }
end

# Bug: https://github.com/crystal-lang/crystal/issues/15484, separate overload needed for splats
def node(name : String, *arguments : KDL::Value::Type, type : String? = nil, comment : String? = nil)
node name, type: type, comment: comment do
arguments.each &->arg(KDL::Value::Type)
end
end

# :ditto:
def node(name : String, *, type : String? = nil, comment : String? = nil, **properties : KDL::Value::Type)
node name, type: type, comment: comment do
properties.each &->prop(Symbol, KDL::Value::Type)
end
end

# :ditto:
def node(name : String, *arguments : KDL::Value::Type, type : String? = nil, comment : String? = nil, **properties : KDL::Value::Type)
node name, type: type, comment: comment do
arguments.each &->arg(KDL::Value::Type)
Expand Down

0 comments on commit 2fa89a0

Please sign in to comment.