Skip to content

Indexing into a sequence defined as a type does not work #13

Description

@HrNilsson

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions