Opened 8 years ago

Closed 3 years ago

Last modified 3 years ago

#4161 closed defect (fixed)

Wrong type mismatch error when handling parameter records

Reported by: Christian Kral <dr.christian.kral@…> Owned by: Adrian Pop
Priority: high Milestone: 1.19.0
Component: New Instantiation Version: v1.11.0
Keywords: Cc: Per Östlund

Description

Please consider the library PhotoVoltaics hosted on GitHub. Download version fd497d1 to demonstrate the following issue:

Check or try to simulate the model PhotoVoltaics.Testing.SimpleResistor. An error is triggered:

[1] 18:05:08 Translation Error
[PhotoVoltaics: 36:50-36:71]: Type mismatch in binding ns = 48.0, expected subtype of Integer, got type Real.

[2] 18:05:08 Translation Error
Error occurred while flattening model PhotoVoltaics.Testing.SimpleResistor

This error is obviously not correct, since there is never any real number assigned to the Integer parameter ns. This simulation example shall have no errors and checks OK with Dymola.

The issue applies to OpenModelica 1.11.0~dev-468-g26ce3a2 used under Linux Mint 18.

Change History (4)

comment:1 by Christian Kral <dr.christian.kral@…>, 8 years ago

Clarification: The issue is related with a parameter record containing the Integer parameter ns

comment:2 by Adeel Asghar, 8 years ago

Cc: Per Östlund added
Component: OMEditFrontend
Owner: changed from Adeel Asghar to Adrian Pop
Status: newassigned

comment:3 by Per Östlund, 3 years ago

Component: FrontendNew Instantiation
Milestone: Future1.18.0
Resolution: fixed
Status: assignedclosed

The error is still there in the old frontend, but works fine with the new frontend that's now the default in OM.

comment:4 by Francesco Casella, 3 years ago

Milestone: 1.18.01.19.0
Note: See TracTickets for help on using tickets.