-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support Mirror synthesis for local and inner classes #15847
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
Conversation
- update child accessibility check for anonymous mirrors in whyNotGenericSum. Now check the prefix at the callsite can access the child. - for sum mirrors, compute a new prefix for each child from the callsite prefix of the parent, see TypeOps.childPrefix. For each child, subsititute its prefix at definition with the childPrefix using asSeenFrom. For polymorphic classes, perform the subsitution on the constructor before inferring constraints. - add tests for issues 13332, 13935, 11174, 12328 - add tests for local/inner classes taken from Shapeless for its Generic type, backed by mirrors
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit https://dotty-bench.epfl.ch/15847/ to see the changes. Benchmarks is based on merging with main (e560c2d) |
should this be back ported to 3.2.0 - e.g. 3.2.0 won't be able to summon a mirror for a local class compiled by 3.2.1, so that makes it a forward source compatibility breaking change |
doing the backport PR now |
A new PR which takes a simpler approach - compute a prefix for the child and use
asSeenFrom
also added documentation changes
fixes #13332
fixes #12328
fixes #11174
fixes #13935
fixes #15122