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]
Note:
See TracTickets
for help on using tickets.
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.