Skip to content
New issue

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

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

Already on GitHub? # to your account

Diversion from nix with duplicate function arguments #45

Closed
oppiliappan opened this issue Nov 4, 2021 · 0 comments · Fixed by #53
Closed

Diversion from nix with duplicate function arguments #45

oppiliappan opened this issue Nov 4, 2021 · 0 comments · Fixed by #53
Assignees
Labels
bug Something isn't working
Milestone

Comments

@oppiliappan
Copy link
Contributor

oppiliappan commented Nov 4, 2021

Describe the bug

Nix throws a parse error if the idents in a pattern are duplicates. rnix-parser does not throw an error. Seems to be defined here.

Code Snippet to reproduce

{a, b, a}: a + b

Expected behavior

Throw a parse error, with the position of the first occurrence of the duplicated identifier.

@oppiliappan oppiliappan added the bug Something isn't working label Nov 4, 2021
@Ma27 Ma27 added this to the 0.10.0 milestone Nov 10, 2021
@Ma27 Ma27 self-assigned this Nov 10, 2021
Ma27 added a commit that referenced this issue Nov 11, 2021
To remain consistent with `nix-instantiate --parser`, expressions like

    { a, a }: a

should be marked as invalid.

Closes #45
@Ma27 Ma27 closed this as completed in #53 Nov 13, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants