Skip to content

Match type with bounds fails to reduce #14477

Closed
@dwijnand

Description

@dwijnand

Is

sealed trait Foo[A, X <: A]

type FooX[F] = F match {
  case Foo[a, x] => x
}

type MyFoo = Foo[String, "hello"]

val hello: FooX[MyFoo] = "hello"

related? It gives the error:

Found:    ("hello" : String)
Required: FooX[MyFoo]

Even in 3.1.2-RC1.

Originally posted by @s5bug in #6697 (comment)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions