Opened 4 years ago

Last modified 4 years ago

#6221 closed defect

The NF ignores a redeclare statement in a record containing a replaceable package and a function call from it — at Version 4

Reported by: Francesco Casella Owned by: Per Östlund
Priority: high Milestone: 1.18.0
Component: New Instantiation Version: 1.16.0
Keywords: Cc: Michael Wetter

Description (last modified by Francesco Casella)

Please check Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Examples.NominalCondition. The NF complains that

[Buildings 7.0.0/Fluid/HeatExchangers/DXCoils/BaseClasses/NominalCondition.mo:36:3-40:32:writable] Error:
Medium is partial, name lookup is not allowed in partial classes.

This shouldn't be the case: the definition of record NominalCondition indeed calls functions from a partial package, but that package is redeclared to a non-partial one in the model being compiled.

I guess something goes wrong in the propagation of the redeclared type.

Change History (4)

comment:1 by Francesco Casella, 4 years ago

Resolution: fixed
Status: newclosed

Fixed in one of the commits reported here.

This also had a positive influence on other models in the testsuite, particularly within ModelicaTest.

comment:2 by Per Östlund, 4 years ago

Resolution: fixed
Status: closedreopened

Unfixed in PR 6946. The redeclare issue wasn't fixed, b2811ee relaxed the error checking a bit too much when instantiating record constructors.

comment:3 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:4 by Francesco Casella, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.