Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#6188 closed defect (fixed)

NF Type mismatch in Buildings model involving redeclared class

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

Description (last modified by Francesco Casella)

https://libraries.openmodelica.org/branches/master/Buildings_7.0.0/files/Buildings_7.0.0_Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACSimpleGridMedium.err Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACSimpleGridMedium] reports:

[/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/build/lib/omlibrary/Buildings 7.0.0/Electrical/AC/ThreePhasesBalanced/Lines/Examples/ACSimpleGridMedium.mo:6:13-8:46:writable] Error: Type mismatch in binding commercialCable = network.grid.cables, expected array dimensions [], got [1].

during NFTyping.typeBindings.

Change History (7)

comment:1 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

comment:2 by Francesco Casella, 4 years ago

Description: modified (diff)

comment:3 by Francesco Casella, 4 years ago

Cc: Michael Wetter added

comment:4 by Per Östlund, 4 years ago

Looking into this it seems like the error is actually valid, commercialCable is a scalar while network.grid.cables is an array. I reported this in #2503.

comment:5 by Francesco Casella, 4 years ago

But the modifier is applied to the array cables, so it seems the code is indeed valid, and the NF fails to recognize the situation.

comment:6 by Per Östlund, 3 years ago

Resolution: fixed
Status: newclosed

Fixed in b7d5bf71.

comment:7 by Francesco Casella, 3 years ago

Great!

Note: See TracTickets for help on using tickets.