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

Whitespaces in front of global paths are removed #3

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

Whitespaces in front of global paths are removed #3

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

Comments

@m-kessler
Copy link
Contributor

If global class paths are used, the whitespace in front of the path is removed.

Running mofmt on this:

model AbsolutePaths
  extends .Modelica.Fluid.Examples.NonCircularPipes(
    redeclare package Medium = .Modelica.Media.Water.StandardWaterOnePhase);
end AbsolutePaths;

Gives:

...
  extends.Modelica.Fluid.Examples.NonCircularPipes(
    redeclare package Medium =.Modelica.Media.Water.StandardWaterOnePhase);
...

Note the missing whitespaces before both global paths starting with .Modelica.

This is no issue in OpenModelica, but Dymola does not like the missing whitespace between extends and the class path and automatically reformats the code with a newline:

  extends 
         .Modelica.Fluid.Examples.NonCircularPipes(
    redeclare package Medium =.Modelica.Media.Water.StandardWaterOnePhase);
@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 added a commit that referenced this issue Nov 23, 2023
This fixes #3.

Test were updated to detect such regression in future.
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