Opened 7 years ago

Closed 7 years ago

#5066 closed defect (fixed)

[NF] checkModel(Path.To.Protected.Class) fails

Reported by: Adrian Pop Owned by: Per Östlund
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Because we have the check for protection on elements now during lookup we cannot check protected functions or models. I guess we should disable this check for the first lookup of the main class to instantiate.

For example:

checkModel(Modelica.Blocks.Continuous.Internal.Filter.Utilities.normalizationFactor.normalizationResidue); getErrorString();

gives you:

"[c:/home/adrpo33/dev/OpenModelica/build/lib/omlibrary/Modelica 3.2.2/Blocks/Continuous.mo:4070:11-4102:35:writable] Error: Illegal access of protected element normalizationResidue.
Error: Class Modelica.Blocks.Continuous.Internal.Filter.Utilities.normalizationFactor.normalizationResidue not found in scope <top>.
[c:/home/adrpo33/dev/OpenModelica/build/lib/omlibrary/Modelica 3.2.2/Blocks/Continuous.mo:4070:11-4102:35:writable] Error: Illegal access of protected element normalizationResidue.
Error: Class Modelica.Blocks.Continuous.Internal.Filter.Utilities.normalizationFactor.normalizationResidue not found in scope <top>.
"

Change History (1)

comment:1 by Per Östlund, 7 years ago

Resolution: fixed
Status: newclosed

Fixed in 2cce7a4. Lookup.lookupClassName now has a flag that can be used to toggle the check for access violations.

Note: See TracTickets for help on using tickets.