Opened 7 years ago

Closed 7 years ago

#4664 closed defect (fixed)

max() does not return the correct type in NF

Reported by: Francesco Casella Owned by: Mahder Alemseged Gebremedhin
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Please check
https://libraries.openmodelica.org/branches/newInst/Modelica_3.2.2/files/Modelica_3.2.2_Modelica.Blocks.Examples.NoiseExamples.DrydenContinuousTurbulence.err

The following error is reported:

[/var/lib/hudson/slave/workspace/OpenModelica_TEST_LIBS
 /OpenModelica/OMCompiler/build/lib/omlibrary
 /Modelica 3.2.2/Blocks/Continuous.mo:1183:5-1183:61:writable]
 Error: Type mismatch for positional argument 1 in 
 zeros(=max(0, (Hw.na - Hw.nb))). The argument has type:
 <ScalarBasicType> expected type: Integer

Why is max(Integer, Integer) returning <ScalarBasicType> and not <Integer>?

Change History (2)

comment:1 by Francesco Casella, 7 years ago

Component: *unknown*New Instantiation
Milestone: Future2.0.0
Owner: changed from somebody to Mahder Alemseged Gebremedhin
Status: newassigned

comment:2 by Per Östlund, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed in aa363fe. The model now fails due to #4663.

Note: See TracTickets for help on using tickets.