-
In my Java code, I have an interface
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
And suddenly, the pattern started matching. So, my question is: how do I get the pattern to match on the generic type |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 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.
I simplified the description so that it's hopefully easier to reproduce - that said, I have not provided a code reproducer. If one is absolutely necessary, I can give access to my code, where the issue would show up. (But that would by no means be a minimal reproducer, and therefore I think it reading through it may cost more time than it saves.)