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

Incorrect instantiation of functors using interfaces with type synonyms in the interface #1466

Closed
yav opened this issue Nov 14, 2022 · 0 comments
Assignees
Labels
bug Something not working correctly parameterized modules Related to Cryptol's parameterized modules

Comments

@yav
Copy link
Member

yav commented Nov 14, 2022

Consider the following example:

interface module I where
  type n : #
  type W = [n]

module A where
  import interface I as I
  // This defines a synonym with the same
  // name as the one imported from `I`
  type W = I::W

module B = module A where
  type n = 8

This results in:

[error]
    Overlapping symbols defined:
    (at ./A.cry:5:8--5:9, B::W)
    (at ./A.cry:2:20--2:21, B::W)

This should work and not complain.
The locations in the error refer to the W defined in A and the one imported from I

@yav yav added bug Something not working correctly parameterized modules Related to Cryptol's parameterized modules labels Nov 14, 2022
@yav yav self-assigned this Nov 14, 2022
yav added a commit that referenced this issue Nov 16, 2022
@yav yav closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something not working correctly parameterized modules Related to Cryptol's parameterized modules
Projects
None yet
Development

No branches or pull requests

1 participant