Opened 20 years ago

Last modified 19 years ago

#14 closed defect (fixed)

elaborating arrayconstructors fails when mixing variables with expressions

Reported by: haklu Owned by: haklu
Priority: high Milestone:
Component: Version:
Keywords: Cc: haklu, Adrian Pop

Description


Change History (2)

comment:1 by haklu, 20 years ago

model BoolArrayTest

Boolean b[2]={a,time > 2}; Error

Boolean b[2]={a,c}; works fine
Boolean b[2]={time > 1,time > 2}; works fine

Boolean a;
Boolean c;

equation

a = time > 1;
c = time > 2;

end BoolArrayTest;

$ ./modeq +d=errorbuf BoolArrayTest.mo
#|Execution failed!


Error buffer:

# Incompatible types in array expression

a is of type Boolean
while the elements [time > 2] are of type Boolean

  • elab_array failed

Execution failed!

comment:2 by Peter Aronsson, 19 years ago

This bug was fixed by Håkan, and testcase added to testsuite by Peter.

Note: See TracTickets for help on using tickets.