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

Invalid errors on Self-imports. #104

Open
AZWN opened this issue Sep 5, 2022 · 0 comments
Open

Invalid errors on Self-imports. #104

AZWN opened this issue Sep 5, 2022 · 0 comments

Comments

@AZWN
Copy link
Contributor

AZWN commented Sep 5, 2022

Bug description
A direct self-import in a Statix module gives error messages on rule definitions.

Versions
2.5.17

Steps to reproduce the behavior
Open the following Statix specification:

module mod

imports mod

rules 
  id:
  id().

Observed behavior
Editor error messages:

Unresolved constraint "id"
Unsolved: ?mod.stx-d-2 : ?mod.stx-ty-2
Unsolved: [] is `in-types` of ?mod.stx-ty-2
Unsolved: Rules can only be defined for declared constraints.
Unsolved: Use `c(...) = ... | ...` for functional constraints.

Expected behavior
Either (1) no error messages, or (2) an error on the self-import.

Additional context
Originally reported by @toinehartman.

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

No branches or pull requests

1 participant