scala-ide/scala-ide — pull request #569 by dotta (2013-10-16 12:40:55+00:00)
Title: Test demonstrating wrong hyperlinking on metod w/ default arg

(Even though the bug is on the compiler side, I believe this test is still relevant and should also exist on our side)

This test demonstrates that the Tree returned by `askTypeAt` is wrong when the
request is executed *after* fully-typechecking the sources used for the test.

I've debugged the problem inside the Scala IDE, and the reason why this happen
is that `askTypeAt` returns the enclosing `foo` DefDef method symbol, instead
of the expected Select `Bar.bar` node. The enclosing method is returned becuase
all Trees inside the method block have a *TransparentPosition*, all the way
down. The impelmentation of `askTypeAt` relies on
`RangePositions.Locator.traverse` to return the deepest, non-transparent, tree
that includes the passed position. And, because all positions are transparent
inside the `foo` method's body, then the `foo` symbol is returned.

An additional interesting fact is that it looks like one of the transformation
happening during typechecking is to blame for updating the Tree with the wrong
kind of positions. In fact, if the source file isn't typechecked, the correct
symbol is returned.

Enable the test once https://issues.scala-lang.org/browse/SI-7915 is fixed

Re #1001921