Opened 12 years ago

Closed 12 years ago

#2119 closed defect (fixed)

Bad codegen for simple when-equation

Reported by: Martin Sjölund Owned by: Lennart Ochel
Priority: high Milestone: 1.9.0
Component: Code Generation Version: trunk
Keywords: Cc: Lennart Ochel

Description

Bad codegen for simple when-equation:

model M
  Real r[3];
equation
  r[1] = 1;
  r[3] = 2;
  when sample(0.1,0.1) then
    r[2] = time;
  end when;
end M;
M.c:202: error: incompatible types when assigning to type ‘modelica_real’ from type ‘real_array’

Change History (3)

comment:1 by Martin Sjölund, 12 years ago

Also der(r[2]) is not supported :( (Although I don't yet know if it's allowed)

Version 0, edited 12 years ago by Martin Sjölund (next)

comment:2 by Lennart Ochel, 12 years ago

Owner: changed from Willi Braun to Lennart Ochel
Status: newassigned

comment:3 by Lennart Ochel, 12 years ago

Resolution: fixed
Status: assignedclosed

Probably in r16374.

Note: See TracTickets for help on using tickets.