Skip to content

Complete packages if they contain toplevel definitions #14101

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
tgodzik opened this issue Dec 13, 2021 · 2 comments · Fixed by #14756
Closed

Complete packages if they contain toplevel definitions #14101

tgodzik opened this issue Dec 13, 2021 · 2 comments · Fixed by #14756
Assignees

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Dec 13, 2021

Compiler version

3.1.0-RC2

Minimized code

In a REPL session:

package example:
    def foo = ""

def main =
  exam@@

and press TAB (or invoke code completion in IDE)

Output

No completions are suggested

Expectation

We should get a suggestion of example

In Scala 2 this approach worked with package objects such as widely used pprint library and made it much easier to discover the utility methods contained there. This should probably also work for package object in Scala 3.

@prolativ
Copy link
Contributor

I believe you meant We should get a suggestion of example, right?

@tgodzik
Copy link
Contributor Author

tgodzik commented Dec 14, 2021

I believe you meant We should get a suggestion of example, right?

You're right! Updated.

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.

3 participants