Open
Description
Given this code, where |
denotes position of the cursor where we request to jump to definition of item in that position:
case class Foo(a: Int, b: Int)
object Foo {
// Jump correctly to Foo
def get1 = Foo(
|a = 1,
b = 2
)
// Jump incorrectly to get2 method definition
def get2 = Foo(
|b = 2,
a = 1
)
}
When asked for type in get1
method, presentation compiler is returning scala.reflect.internal.Trees.Apply
, which will take us to case class Foo
definition as expected.
When asked for type in get2
method, presentation compiler is returning scala.reflect.internal.Trees.DefDef
, which will take us to method def2
definition.
Expected bahaviour is in both cases to jump to case class Foo
definition.
This is causing inconsistent behaviour in scala-ide and ensime.