Groovy should ignore bridge methods.
This eliminates redundant method calls, although that isn't why
I need it.
My primary reason for this change is bit unusual; I've got a little
byte code post processor to inject synthetic bridge methods
to help me evolve code without breaking existing binaries,
<http://bridge-method-injector.infradna.com/>, and as a part of this
I generate a bridge method whose return type is narrower, instead of
That is, whereas normally bridge methods are as follows:
my byte code post processing would produce this:
This works with javac, in the sense that it'll invoke "Object foo()", by preferring non-bridge methods for resolution.
Unfortunately, Grooovy doesn't discreminate against bridge methods, so it can end up calling "String foo()" depending on the exact implementation detail of the search.
This fix eliminates this issue by making Groovy ignore all bridge methods. Would you please please include this?