[BLUEJ-422] "Maybe you meant" misfires when there is more than one method call on a line
I have some code in a method like this:
{noformat} w.getOverlay().drawExactLine(w.toMiddle(getX()), toMiddle(getY()), w.toMiddle(x), w.toMiddle(y), Color.RED); {noformat}
The w in question is of type BoxWorld, which has a method toMiddle. The code is in Player, which has no such method. I accidentally missed a "w." from a toMiddle call and got the confusing error:
{noformat} cannot find symbol - method toMiddle(int); maybe you meant toMiddle(int) {noformat}
The error message should not offer me "toMiddle(int)" as a correction there because it's not a method of Player, only of BoxWorld. The correct error should simply be:
{noformat} cannot find symbol - method toMiddle(int) {noformat}
I suspect this is quite a subtle problem, to do with the code completion context at differing column positions on that line.
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 3.0.8