Skip to content

Cannot use simple instanceof check as a premise #173

@lwrage

Description

@lwrage

The following code gives an error message "This expression is not allowed in this context, since it doesn't cause any side effects." I have no idea what this means.

checkrule CheckExpressions for
  Expression exp
from {
  exp instanceof Literal // error here
  empty |- exp : var Type t
}

The error seems wrong because !!(exp instanceof Literal) does the same thing and is accepted.

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