Skip to content

No completion on type alias #14984

Closed
@tgodzik

Description

@tgodzik

Compiler version

3.1.1

Minimized code

//> 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()

Output

Completions for client do not show anything

Expectation

They should show listStreams

It might be possible to just dealias in:
https://github.com/lampepfl/dotty/blob/main/compiler/src/dotty/tools/dotc/interactive/Completion.scala#L337

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions