Skip to content

Complete packages if they contain toplevel definitions #14101

@tgodzik

Description

@tgodzik

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions