Opened 14 years ago

Last modified 14 years ago

#1346 closed defect (fixed)

type mismatch for range operator

Reported by: Willi Braun Owned by: Willi Braun
Priority: high Milestone:
Component: Instantiation Version:
Keywords: Cc: Willi Braun, Per Östlund

Description

in branches/sjoelund-functiontree for the following model:
{{{model A

parameter Integer b=3;
Integer c[b];

equation

c = 1:b;

end A;}}}

you get following Error message: 
Error: Type mismatch in equation {c[1],c[2],c[3]}=1:b of type Integer[3]=Integer[3]

Change History (2)

comment:1 by Per Östlund, 14 years ago

This is somewhat fixed in revision 6864 of sjoelund-functiontree, by allowing InstSection.instArrayEquation to not expand the equation. This is not a good way of solving it though, so I do not consider this bug fixed. The proper way of solving this would be to consider b to be constant since it's a structural parameter, but that will require a lot more work.

comment:2 by Martin Sjölund, 14 years ago

This was fixed in trunk; are there any testcases for this?

Note: See TracTickets for help on using tickets.