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

Missing support for new break features of MLS 3.6 #6

Closed
m-kessler opened this issue Nov 23, 2023 · 2 comments · Fixed by #8
Closed

Missing support for new break features of MLS 3.6 #6

m-kessler opened this issue Nov 23, 2023 · 2 comments · Fixed by #8
Assignees
Labels
bug Something isn't working
Milestone

Comments

@m-kessler
Copy link
Contributor

Modelica Language Specificaton 3.6 introduced two new features involving the existing break keyword, which are not formatted correct by mofmt:

  1. Removing modifiers
  2. Selective model extension

Here is an example using those new features:

partial model ConditionalExtends
  extends Modelica.Blocks.Examples.PID_Controller(
    break loadTorque,
    inertia1(J=break),
    break connect(speedSensor.w, PI.u_m));
end ConditionalExtends;

Running it through mofmt 0.3.1 gives no errors, but the output is not satisfying:

partial model ConditionalExtends

  extends Modelica.Blocks.Examples.PID_Controller(break loadTorque,
    inertia1(J = break), break connect(speedSensor.w, PI.u_m));

end ConditionalExtends;
@ErykMroczek ErykMroczek added the bug Something isn't working label Nov 23, 2023
@ErykMroczek ErykMroczek self-assigned this Nov 23, 2023
@ErykMroczek ErykMroczek added this to the 0.3.2 milestone Nov 23, 2023
@ErykMroczek
Copy link
Owner

This and other reported issues will be fixed in 0.3.2.

ErykMroczek added a commit that referenced this issue Nov 23, 2023
This fixes #6

Test were updated to prevent such regressions in the future.
@m-kessler
Copy link
Contributor Author

Thanks for the quick fixes. v0.3.2 works like a charm.

By the way, mofmt is a great tool and very helpful. Nicely done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants