Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix updating default value metadata of conditional parameters #2438

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

ven-k
Copy link
Member

@ven-k ven-k commented Jan 30, 2024

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

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
    - [ ] All documentation related to code changes were updated
  • 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.

@ven-k ven-k force-pushed the vkb/if-else-defaults branch from 13071c0 to 3e6fc0d Compare February 6, 2024 10:16
This fixes the bug in populating structure dict for defaults of conditional parameters
@ven-k ven-k force-pushed the vkb/if-else-defaults branch from 3e6fc0d to c65f288 Compare March 1, 2024 08:05
@ven-k
Copy link
Member Author

ven-k commented Mar 1, 2024

Model Parsing tests have passed1

@ChrisRackauckas this is ready to merge.

Footnotes

  1. https://github.com/SciML/ModelingToolkit.jl/actions/runs/8108338346/job/22161424946?pr=2438#step:6:1316

@ChrisRackauckas ChrisRackauckas merged commit 5c03ad3 into SciML:master Mar 1, 2024
18 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants