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

Completions not found for members imported from an object #7280

Closed
scabug opened this issue Mar 21, 2013 · 6 comments
Closed

Completions not found for members imported from an object #7280

scabug opened this issue Mar 21, 2013 · 6 comments

Comments

@scabug
Copy link

scabug commented Mar 21, 2013

No scope completion on members imported from an object. Vals are not found at all. Methods are found, unless the import is inside a def.

This suggests that the presentation compiler mistreats imports in the Context used for completions.

object Cont {
  val myVal = 42
  def longName() {}
}

import Cont._
object T{

  def foo {
    /*!*/ // `myVal` does not show up, but `longName` does
  }
}
@scabug
Copy link
Author

scabug commented Mar 21, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7280?orig=1
Reporter: @dragos
Assignee: @skyluc
Affected Versions: 2.10.1
Other Milestones: 2.11.0-M7

@scabug
Copy link
Author

scabug commented Mar 21, 2013

@dragos said:
IDE ticket: #1001615

@scabug
Copy link
Author

scabug commented Nov 11, 2013

@skyluc said:
There are 2 problems reported in this ticket: vals not being found, and defs not being found sometime.

Some information about the vals is provided by scope completion. Scala IDE currently filters out this information. We will see if it can be fixed on the Scala IDE side, or if we need to open another ticket for this case.

So, the remaining test case for the defs is the following:

object Cont {
  def longName() {}
}

class ImportOut {
  import Cont._

  def foo {
    /*_*/   // `longName` is in the scope members
  }
}

class ImportIn {
  def foo {
    import Cont._
    /*_*/   // `longName` is not in the scope members
  }
}

@scabug
Copy link
Author

scabug commented Nov 12, 2013

@retronym said:
I discussed this one quickly with Iulian last week. I think ContextTrees#locateContext is at fault.

It seems we have no tests at all for scope completion. I extended InteractiveTest to support this on a branch: retronym/scala@scala:2.10.x...ticket/completion2

@scabug
Copy link
Author

scabug commented Nov 12, 2013

@dragos said:
For some reason Luc can't assign the ticket to himself... Any special group he needs to be part of?

@scabug
Copy link
Author

scabug commented Nov 12, 2013

@retronym said:
I've just added him to the jira-developers group

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

1 participant