Community
Participate
Working Groups
In class BlockScope I found several occurrences of this snippet: if (!binding.isValidBinding()) return new ProblemReferenceBinding( CharOperation.subarray(compoundName, 0, currentIndex), null, // TODO should improve binding.problemId()); See e.g. method getBinding(char[][],int,InvocationSite,boolean) To me it looks like the "null" could simply be replaced by ((ProblemReferenceBinding)binding).closestMatch The binding should be a ReferenceBinding in all these locations, so the cast should be safe (?). If, e.g., the problemId() is NotVisible, other parts of the system should be allowed to assume that the problem binding has indeed a closestMatch, shouldn't they?
Definitily, visibility issues should still set the closest match to improve our resilience.
Created attachment 52381 [details] Proposed patch
RELEASED FOR 3.3M3. Fixed
Verified for 3.3 M3 using build I20061030-0010