Skip to content

Commit 57c5119

Browse files
refactor: allow parameter default to be missing in @mtkmodel
1 parent 0f92edc commit 57c5119

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/model_parsing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ function update_kwargs_and_metadata!(dict, kwargs, a, def, indices, type, var,
154154
if !isnothing(meta) && haskey(meta, VariableUnit)
155155
uvar = gensym()
156156
push!(where_types, uvar)
157-
push!(kwargs, Expr(:kw, :($a::Union{Nothing, $uvar}), nothing))
157+
push!(kwargs, Expr(:kw, :($a::Union{Nothing, Missing, $uvar}), nothing))
158158
else
159-
push!(kwargs, Expr(:kw, :($a::Union{Nothing, $type}), nothing))
159+
push!(kwargs, Expr(:kw, :($a::Union{Nothing, Missing, $type}), nothing))
160160
end
161161
dict[:kwargs][getname(var)] = Dict(:value => def, :type => type)
162162
else

0 commit comments

Comments
 (0)