You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add bridges for overridden methods in lambda indy call
If a SAM trait's abstract method overrides a method in a
supertrait while changing the return type, the generated
invokedynamic instruction needs to pass the types of the
overridden methods to `LambdaMetaFactory` so that bridge
methods can be added to the generated lambda.
Java does this differently: it generates a default method
in the subinterface overriding the superinterface method.
Theoretically we could also generate the default bridges,
but that is a binary-incompatible change, so I think it's
safer to just add the bridges in the invokedynamic.
Honestly I'm surprised that this hasn't come up already.
Fixesscala/bug#10512.
0 commit comments