Community
Participate
Working Groups
//renaming I.m to k package p; interface I{ void m(); } class A1 implements I{ public void m(){} } interface I1{ void m(); } 1. programatically create an orpattern on I::m and A1::m (ALL_OCCURRENCES) 2. search in project 3. you get 3 results (all have accurracy 1 (potential)) the one in I1 is incorrect and should not be reported (it seems like it's the or pattern that's causing the problem here - works ok with simple patterns)
The created OrPattern is as follows: OrPattern OrPattern MethodDeclarationPattern I::m MethodReferencePattern I::m OrPattern MethodDeclarationPattern A1::m MethodReferencePattern A1::m When initializing the second reference pattern for polymorphic search, we didn't realize that the compilation unit had already been parsed. As a consequence we overwrote the first one and only the second one was being resolved. The first one was left unresolved and reported inaccurate matches. Fixed by checking if the compilation unit is known before attempting to parse it.