Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake default bridge generation smarter #2520
Open
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since 2.12.0-M5 does not generate explicit bridges to default methods in classes anymore, the linker has more responsibility in creating default method bridges. But the way it does this is suboptimal. Consider:
An ideal solution (and what happened when scalac generated the bridges) is to create the bridge in
A
:But the way the linker works for now is a bit stupid, and it will generate bridges in all the instantiated subclasses of
A
. So ifA
,B
andC
are all instantiated, we end up withWe should make the default bridge generation smarter so that it generates a bridge in the most appropriate place in the parent chain of a class.