Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use simple instanceof check as a premise #173

Open
lwrage opened this issue Sep 16, 2022 · 1 comment
Open

Cannot use simple instanceof check as a premise #173

lwrage opened this issue Sep 16, 2022 · 1 comment

Comments

@lwrage
Copy link

lwrage commented Sep 16, 2022

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.

@LorenzoBettini
Copy link
Contributor

Thanks for reporting that. It's surely a case that's not currently considered as a valid premise. I'll have to look at that. In the meantime, if the double negation works, please use it as a temporary workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants