Skip to content

Commit 3d5db18

Browse files
fixup! fix: allow passing nothing to override default for @mtkmodel models
1 parent 28e155a commit 3d5db18

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/systems/model_parsing.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,9 @@ function update_kwargs_and_metadata!(dict, kwargs, a, def, indices, type, var,
169169
push!(kwargs,
170170
Expr(:kw,
171171
Expr(:(::), a,
172-
Expr(:curly, :Union, :Nothing, Expr(:curly, :AbstractArray, vartype))),
173-
nothing))
172+
Expr(:curly, :Union, :Nothing, :Missing, NoValue,
173+
Expr(:curly, :AbstractArray, vartype))),
174+
NO_VALUE))
174175
if !isnothing(meta) && haskey(meta, VariableUnit)
175176
push!(where_types, vartype)
176177
else

test/model_parsing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ end
840840
n[1:3] = if flag
841841
[2, 2, 2]
842842
else
843-
1
843+
[1, 1, 1]
844844
end
845845
end
846846
end

0 commit comments

Comments
 (0)