Replies: 1 comment 2 replies
-
That sounds like we have a problem either in setting up that type attribution on the method, or subsequently matching it. Did you attach a debugger to see what the type is on that method invocation that fails to match? As a workaround, is |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my Java code, I have an interface
X<A>
with the following method:I am trying to write a pattern that would match this method. I have this, which should work, but doesn't:
I've been racking my brain as to why the above doesn't match the method. (It doesn't match anything.) And then, in desperation, I tried to use the specific implementation of
Y
(let's call itYImpl
) which I actually use in the test for the recipe:And suddenly, the pattern started matching.
So, my question is: how do I get the pattern to match on the generic type
Y
, and therefore get it to rewrite any code using that method, not just code that usesYImpl
?Beta Was this translation helpful? Give feedback.
All reactions