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

Repeating idents in functional dependencies crashes compiler #152

Closed
PROMETHIA-27 opened this issue Feb 13, 2023 · 1 comment
Closed

Repeating idents in functional dependencies crashes compiler #152

PROMETHIA-27 opened this issue Feb 13, 2023 · 1 comment

Comments

@PROMETHIA-27
Copy link

PROMETHIA-27 commented Feb 13, 2023

Minimal repro:
trait Crashy a -> t t

This is sufficient to cause the panic:
thread 'main' panicked at 'assertion failed: prev.is_none()', src\nameresolution\scope.rs:172:9

jfecher added a commit that referenced this issue Feb 15, 2023
@jfecher
Copy link
Owner

jfecher commented Feb 15, 2023

Fixed in 056b108.

This is somewhat related to the previous change with resolving trait arguments. The fix is to change this assert to instead push a user visible error that the type variable was declared twice. These type variables don't actually have Locations associated with them though, so the reported location is only approximate and can be improved.

@jfecher jfecher closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants