Skip to content
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

[SemanticDB] Missing symbol occurrence for type annotation #13270

Closed
tanishiking opened this issue Aug 9, 2021 · 2 comments · Fixed by #13284
Closed

[SemanticDB] Missing symbol occurrence for type annotation #13270

tanishiking opened this issue Aug 9, 2021 · 2 comments · Fixed by #13284
Assignees
Milestone

Comments

@tanishiking
Copy link
Member

Missing symbol occurrence for an upper bound of the type parameter of class/trait/object definition.

Compiler version

v3.0.1

Minimized example

class Foo[T <: Int]

Output

class Foo/*<-example::Foo#*/[T/*<-example::Foo#[T]*/ <: Int]

For example, see: https://github.com/lampepfl/dotty/blob/49250915e0d28f3450f03d16a24c14577bc17562/tests/semanticdb/expect/i9782.expect.scala#L8

Expectation

class Foo/*<-example::Foo#*/[T/*<-example::Foo#[T]*/ <: Int/*->scala::Int#*/]

Possible solution

See:

@bishabosha
Copy link
Member

I think this can be extracted by finding the matching type tree in the primary constructor

@tanishiking
Copy link
Member Author

I'm taking a look at this issue :)


Also, some type annotations for DefDef lacks symbol occurrence
https://github.com/lampepfl/dotty/blob/e7a641c5ad61fa683423954fa9263079a890c809/tests/semanticdb/expect/Prefixes.expect.scala#L27

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