Skip to content

Cannot go to definition of an annotation of a type #5722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicolasstucki opened this issue Jan 16, 2019 · 1 comment
Closed

Cannot go to definition of an annotation of a type #5722

nicolasstucki opened this issue Jan 16, 2019 · 1 comment

Comments

@nicolasstucki
Copy link
Contributor

This can be reproduced in dotty.tools.languageserver.DefinitionTest with

@Test def i4678: Unit = {
    code"""class Foo {
          |  val x: Int = (1: @annot${m1}1${m2} ${m3}@annot2${m4})
          |}
          |class ${m5}annot1${m6} extends scala.annotation.Annotation
          |class ${m7}annot2${m8} extends scala.annotation.Annotation
          |""".withSource
      .definition(m1 to m2, List(m5 to m6))
      .definition(m3 to m3, List(m7 to m8))
  }
@nicolasstucki
Copy link
Contributor Author

When looking for a tree that is in a position inside a TypeTree we also need to check the type for its annotations. Each annotation has the tree and its position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants