Skip to content

Context-bound on unnamed type parameter becomes Any #11425

@dwijnand

Description

@dwijnand
Welcome to Scala 2.12.8 (OpenJDK 64-Bit Server VM, Java 11.0.2).
Type in expressions for evaluation. Or try :help.

scala> class F[_]
defined class F

scala> class A[_: F]
defined class A

scala> implicit val x: F[Int] = new F[Int]
x: F[Int] = F@217235f5

scala> new A[Int]
<console>:14: error: could not find implicit value for evidence parameter of type F[Any]
       new A[Int]
       ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions