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

Instantiating a constant with a sum type fails with a cyclic declaration error #1488

Open
romac opened this issue Aug 26, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@romac
Copy link
Member

romac commented Aug 26, 2024

module const_msg {
  const MSG: Msg

  type Msg = Foo | Bar
}

module MC {
  import const_msg(MSG = Foo).*
}
❯ quint typecheck const_list.qnt

Actual result

The spec above fails to type check with:

/Users/romac/Informal/Code/quint/const_list.qnt:8:3 - error: [QNT099] Found cyclic declarations. Use fold and foldl instead of recursion
8:   import const_list(MSG = Foo).*
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/Users/romac/Informal/Code/quint/const_list.qnt:8:27 - error: [QNT099] Found cyclic declarations. Use fold and foldl instead of recursion
8:   import const_list(MSG = Foo).*
                             ^^^

error: parsing failed

Expected result

The spec should type check.

@romac romac added the bug Something isn't working label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant