Skip to content

Cannot translate usage of wildcard type from Scala 2 #9897

Closed
@oyvindberg

Description

@oyvindberg

Minimized code

type WatchHandler[T] = Function2[/* val */ T, /* oldVal */ T, scala.Unit]
val handlers: Seq[WatchHandler[_]] = Nil

Output

unreducible application of higher-kinded type [T] =>> (T, T) => Unit to wildcard arguments

Expectation

In Scala 2 this compiles. I tried replacing with ? instead, but got the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions