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

Tab completion for aliased constructors in REPL #11846

Open
Jasper-M opened this issue Jan 7, 2020 · 2 comments
Open

Tab completion for aliased constructors in REPL #11846

Jasper-M opened this issue Jan 7, 2020 · 2 comments

Comments

@Jasper-M
Copy link
Member

@Jasper-M Jasper-M commented Jan 7, 2020

scala> class Foo(i: Int) { def this(s: String) = this(s.toInt) }
defined class Foo

scala> new Foo
   def <init>(i: Int): Foo   def <init>(s: String): Foo

scala> type Bar = Foo
defined type alias Bar

scala> new Bar
   type Bar = Bar

type Bar = Bar very informative by the way. Perhaps fix the tab completion for type aliases in general while we're at it...

In constructor position I would just expect def <init>(i: Int): Foo def <init>(s: String): Foo though.

@SethTisue

This comment has been minimized.

Copy link
Member

@SethTisue SethTisue commented Jan 10, 2020

Note that Metals uses the REPL's tab-completion code, so I would expect this to benefit Metals as well.

@Jasper-M

This comment has been minimized.

Copy link
Member Author

@Jasper-M Jasper-M commented Jan 10, 2020

In case that wasn't clear, this also affects tab completion on things like new String since String is an alias.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.