#5011 closed defect (fixed)
The scalar() function is sometimes not flattened by the NF
| Reported by: | Francesco Casella | Owned by: | Per Östlund |
|---|---|---|---|
| Priority: | high | Milestone: | 2.0.0 |
| Component: | New Instantiation | Version: | |
| Keywords: | Cc: |
Description
Please consider the following test case:
model TestScalar
function f
input Real u[:];
output Real y = n;
protected
Integer n = scalar(size(u)) - 1;
annotation(Inline=false);
end f;
Real x[1] = {1};
Real y = f(x);
end TestScalar;
the flattened code contains
function TestScalar.f input Real[:] u; output Real y = /*Real*/(n); protected Integer n = scalar(size(u)) - 1; end TestScalar.f;
which later breaks the code generation because scalar() is undefined.
This issue affects Modelica.Media.Examples.R134a.R134a2.
Note:
See TracTickets
for help on using tickets.

Fixed in 40db59ee.