-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
synthesize mirrors for small generic tuples #15250
Conversation
6b11dfe
to
8f55301
Compare
Edit: I don't know why the erasure of Perhaps it depends on either tupleArity or tupleElementTypes which I modified |
I think it'd probably be cleaner to make a variant of |
3cc35fc
to
0b90f35
Compare
@odersky I ask here for advice because the issue here is that typically we would extract a class symbol from a type, and judge if that class symbol is a generic product, but we can't make a class symbol for a generic tuple type. an alternative would be to mirror the classSymbol operation but only extract to a Option of a generic tuple, (rather than the fusion here) |
0b90f35
to
7299938
Compare
I have simplified the way to extract the tuple proxy, with a trade off that it traverses the type twice if necessary |
This comment was marked as outdated.
This comment was marked as outdated.
7299938
to
b4a97d6
Compare
5677126
to
888ec2b
Compare
It probably does. In PR #14586, I found the following: def test0: Int *: EmptyTuple.type = ??? // erases to `Tuple1`
def test1: Int *: EmptyTuple = ??? // erases to `Product` It doesn't seem like these types should be erased differently but they are. That PR also fixes treating |
Thanks for noticing these cases - I had a look after I made the comment and traced it earlier to the implementation of |
ac538f2
to
93e06be
Compare
0094836
to
f82f8cb
Compare
- handles generic tuples of different arity
f82f8cb
to
352cc6f
Compare
Last changes pushed were to treat only |
finally,
summon[Mirror.Of[Int *: String *: EmptyTuple]]
,has the nice benefit of also being possible to summon a mirror that is derived from the
MirroredElemTypes
of another mirrorfixes #14127
fixes #7049