Skip to content

Commit 112d55e

Browse files
author
Jack Dunham
committed
Remove @info statement and fix bug with astypes not promoting correctly.
1 parent 917f2f1 commit 112d55e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/solvers/default_kwargs.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ macro default_kwargs(args...)
3434
kwargs = (;)
3535
for opt in args
3636
if @capture(opt, key_ = val_)
37-
@info "" key val
3837
kwargs = merge(kwargs, NamedTuple{(key,)}((val,)))
3938
elseif opt === last(args)
4039
return default_kwargs_macro(opt; kwargs...)
@@ -80,16 +79,15 @@ function default_kwargs_macro(function_def; astypes=true)
8079
end
8180

8281
# Promote to the type domain if wanted
82+
new_ex[:args] = convert(Vector{Any}, ex[:args])
8383
if astypes
84-
new_ex[:args] = map(ex[:args]) do arg
84+
new_ex[:args] = map(new_ex[:args]) do arg
8585
@capture(arg, name_::T_)
8686
return :($(name)::Type{<:$T})
8787
end
8888
end
8989

9090
new_ex[:name] = :(ITensorNetworks.default_kwargs)
91-
new_ex[:args] = convert(Vector{Any}, ex[:args])
92-
9391
new_ex[:args] = pushfirst!(new_ex[:args], :(::typeof($(esc(ex[:name])))))
9492

9593
# Escape anything on the right-hand side of a keyword definition.

0 commit comments

Comments
 (0)