Skip to content

type in decl is ignored in favour of RHS #21

@sillydan1

Description

@sillydan1

example:

public clock x := 0;
public clock y := 0_ms;

will not evaluate to a clock variable. It will evaluate to an int:

evaluated:
    x :-> 0 i
    y :-> 0 c

The clock keyword is being ignored in favour of the right-hand-side expression...

You can even do this:

clock x := "test"

and it will work.

We should throw an exception if the RHS and type specification does not match (or cannot be implicitly converted).

essentially, all TYPEs are treated as auto at the moment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working as expected

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions