Skip to content

Completions doesn't return class member inside non-empty method body #12018

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
dos65 opened this issue Apr 7, 2021 · 0 comments · Fixed by #12029
Closed

Completions doesn't return class member inside non-empty method body #12018

dos65 opened this issue Apr 7, 2021 · 0 comments · Fixed by #12029
Assignees
Milestone

Comments

@dos65
Copy link
Contributor

dos65 commented Apr 7, 2021

3.0.0-RC2

They work normally for a class member in most cases except the following one:

class Foo(abc: Int) {
   
   def method: Int = {
      ab@@ // <- no `abc` in results
      42
   }
}

However, it works in other cases:

class Foo(abc: Int) {
   ab@@ // <- works in body
   def method: Int = {
      ab@@ // <- works in empty method body
   }
   def method2: Int = {
      val smth = ab@@ // <- works if goes after assignment to val
      42
   }
}

Expectation

It should return a reference to the member in the first described case.

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

Successfully merging a pull request may close this issue.

4 participants