Opened 14 years ago

Last modified 14 years ago

#1392 closed defect (worksforme)

Functions with inputs and outputs in protected section gives no error.

Reported by: petar Owned by: petar
Priority: high Milestone:
Component: Version:
Keywords: Cc: petar,

Description

The following function works fine to check:
{{{function AddIntegerToQueue
protected

Boolean added;
input Integer array[10];
input Integer valueToAdd;
output Integer newArray[10];

algorithm

newArray:=array;
for i in 1:10 loop

if not added then

if array[i] == 0 then

newArray[i]:=valueToAdd;
added:=true;

end if;

end if;

end for;

end AddIntegerToQueue;}}}

But it should give an errorr that the inputs and outputs are declared in a protected section.

Change History (2)

comment:2 Changed 14 years ago by sjoelund.se

OpenModelica trunk returns: [a.mo:4:3-4:26:writable] Error: array was declared protected but should be public.
This was fixed in bug #1371 / r7470

Note: See TracTickets for help on using tickets.