Skip to content

Invalid errors on Self-imports. #104

@AZWN

Description

@AZWN

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions