-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Anonymous given name clash for tuples #6938
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
Comments
FWIW I have a feature request for this here: lampepfl/dotty-feature-requests#59
|
Oh, right. I'd say that was a bug rather than a feature request. Synthetic names should never clash. |
I just hit this and its a real error. All the tuples get crunched down to the same name (in the same package). The work around is to wrap it or put it in another package, etc. |
The simpler workaround is to give an explicit name to your givens. |
Oh, that's much simpler. Did not think of that. |
Fix #6938: Expand tuples when synthesizing given names
I think this is only an issue for tuple types with arity > 1 ...
Given,
The compiler will name the
Tuple1
instance asFoo_Tuple1_given
, but both theTuple2
andTuple3
instances are namedFoo_Tuple_given
which results in the above failing with,The text was updated successfully, but these errors were encountered: