The following class illustrates the bug.
class A
types
B = seq of real;
operations
public testTypeIndexing : () ==> ()
testTypeIndexing() ==
(
dcl first : seq of real := [1,2,3],
second : B := [1,2,3];
first(1) := 4; -- Works fine
second(1) := 4; -- Does not work: Error 4020: State value is neither a sequence nor a map in 'A' (...\model_de\A.vdmrt) at line 14:3
);
thread periodic(1e9, 0, 0, 0)(testTypeIndexing)
end A
The following class illustrates the bug.