ModelingToolkit.jl
ModelingToolkit.jl copied to clipboard
Fix updating default value metadata of conditional parameters
This fixes the bug in populating structure dict for defaults of conditional parameters
Fixes:
julia> a = true; @mtkmodel A begin
@parameters begin
if a
b = 2, [description = "sjodf"]
end
end
end
ERROR: LoadError: ArgumentError: invalid index: :b of type Symbol
Checklist
- [x] Appropriate tests were added
- [x] Any code changes were done in a way that does not break public API ~- [ ] All documentation related to code changes were updated~
- [x] The new code follows the contributor guidelines, in particular the SciML Style Guide and COLPRAC. ~- [ ] Any new documentation only uses public API~
Additional context
No doc changes are required.