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 not shown after dealiasing #3786

Closed
kubukoz opened this issue Apr 4, 2022 · 5 comments
Closed

Scala 3: completions not shown after dealiasing #3786

kubukoz opened this issue Apr 4, 2022 · 5 comments
Labels
bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Apr 4, 2022

Describe the bug

Completions don't seem to work on higher-kinded types applied in a type alias. Not sure if this is a Metals issue or something in the compiler, but here it is:

//> using scala "3.1.1"
//> using option "-Ykind-projector"
package example

trait Service[F[_]] {
  def listStreams(): F[Unit]
}

type Client[Alg[_[_]]] = Alg[Option]

val client: Client[Service] = ???
val client2: Service[Option] = ???

def test = client. /* doesn't work */ listStreams()
def test2 = client2. /* works */ listStreams()

Completions on client. don't show anything that actually comes from Service's interface, but completions on client2 work flawlessly.

Expected behavior

Completions work in both cases

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v0.11.2+125-ed5fb2f2-SNAPSHOT

Extra context or search terms

No response

@tanishiking tanishiking added Scala 3 Generic ticket relating to Scala 3 bug Something that is making a piece of functionality unusable labels Apr 6, 2022
@tgodzik
Copy link
Contributor

tgodzik commented Apr 7, 2022

Thanks for reporting! This looks like something that might need to get fixed in the compiler, I will double check next week.

@tgodzik
Copy link
Contributor

tgodzik commented Apr 20, 2022

Finally managed to double check and it's an issue in the compiler, reported here: scala/scala3#14984

@tgodzik
Copy link
Contributor

tgodzik commented Apr 28, 2022

Looks like this will be fixed in the next compiler version. Let's take a look at it then.

@tanishiking
Copy link
Member

Closing, confirmed this is fixed in Scala 3.2.0-RC1 scala/scala3#15047 🎉

@kubukoz
Copy link
Contributor Author

kubukoz commented Oct 6, 2022

working as expected in 3.2.0!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3
Projects
None yet
Development

No branches or pull requests

3 participants