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

Scala 3: Completions, HOFs and aliased tuple types #6613

Open
kubukoz opened this issue Jul 22, 2024 · 2 comments · May be fixed by scala/scala3#21510
Open

Scala 3: Completions, HOFs and aliased tuple types #6613

kubukoz opened this issue Jul 22, 2024 · 2 comments · May be fixed by scala/scala3#21510
Labels
Scala 3 Generic ticket relating to Scala 3 upstream-fix-needed Waiting on a fix upstream

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Jul 22, 2024

Describe the bug

To reproduce:

  1. Write this
//> using scala 3.5.0-RC5
trait Foo {
  def setup: List[Foo.Result]
}

object Foo {
  type Result = (String, String)

  def demo(foo: Foo) = {
    foo.setup.map<cursor>
  }

}
  1. Get completions at <cursor>
  2. See this:

Uploading image.png…

Expected behavior

  • No parenthesis around Result
  • Wouldn't mind seeing the type alias's enclosing type name (Foo.Result) like in Scala 2
image

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.3.3

Extra context or search terms

  • This is a really minor issue, arguably a cosmetic
  • Opaque types don't have the parenthesis
@tgodzik
Copy link
Contributor

tgodzik commented Jul 23, 2024

Thanks for reporting! Looks like the first picture didn't upload, but I guess this about the added () around Foo.Result?

The type alias changes might have not been ported yet to Scala 3 repo.

@tgodzik tgodzik added Scala 3 Generic ticket relating to Scala 3 upstream-fix-needed Waiting on a fix upstream labels Jul 23, 2024
@kubukoz
Copy link
Contributor Author

kubukoz commented Jul 23, 2024

Yes, sorry, I didn't notice after posting 😅 the completion in Scala 3 shows "(Result)" where 2.13 shows "Foo.Result".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scala 3 Generic ticket relating to Scala 3 upstream-fix-needed Waiting on a fix upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants