-
Notifications
You must be signed in to change notification settings - Fork 296
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
Error when trying to call a function which is defined inside an instantiated record of a class #8428
Comments
The relevant rule from the specification for looking up a name in the form of A.B.C is:
So looking up a name on the form |
I opened #3089 on the Modelica Specification issue tracker. Let's see what is the sentiment there. |
ok thanks for investigations so far. Looking to here from you. Yes exactly no warnings or error in dymola. |
Currently we have a comment from a developer of Maplesim, which also accepts this construct. Let's see what the coordinator says. |
- Allow comp1..compN.class1..classN.function(), previously only comp.class1..classN.function() was allowed. Fixes OpenModelica#8428
Since it seems pretty certain that this is meant to be allowed I've changed the NF to allow it in #8444. |
- Allow comp1..compN.class1..classN.function(), previously only comp.class1..classN.function() was allowed. Fixes OpenModelica#8428
- Allow comp1..compN.class1..classN.function(), previously only comp.class1..classN.function() was allowed. Fixes #8428
Description
Error when trying to access a class (here a function) via a component through an instance of the component and the record, which holds the function. However, when switching to old Frontend the simulation progresses as expected.
Steps to Reproduce
• A function is declared within a record
• Within a component an instance of the record is created
• An instance of the component is created and the function is called through the instance of the component and the instance of the record
• When run in OMEdit, first a translation error occurs
• After that the window occurs, where switching to the old frontend is possible
• The Testcase runs on the old frontend only
Expected Behavior
access should be possible. Backround is that this function will be replaceable later on and might have different implementations. This will be implemented inside an outer component so all components can use a replaceable function which is set inside the instance of the outer component.
Version and OS
Additional Context
Models for minimal example
The text was updated successfully, but these errors were encountered: