Opened 7 months ago

Last modified 7 months ago

#5762 assigned enhancement

New test case

Reported by: tgutzmann Owned by: tgutzmann
Priority: major Milestone:
Component: Modelica/FrontEnd Version: trunk
Keywords: Cc:

Description

The following model tests a corner case in passing records with a constant that defines size of arrays to a function.
It should be added to FunctionTests.mo

model ConstantInRecordFunctionArgument
    record R
        constant Integer n = 1;
        Real[n] x = 1:n;
    end R;
        
    function f
        input R r;
        output Real y;
    algorithm
        y := 0;
        for i in 1:r.n loop
            y := y + r.x[i];
        end for;
    end f;
        
    R r(n=2);
    Real y = f(r);

Change History (1)

comment:1 Changed 7 months ago by tgutzmann

Committed: r12668

Note: See TracTickets for help on using tickets.