Skip to content

no implicit argument was found for implicit parameter #14171

Open
@fdietze

Description

@fdietze

Compiler version

3.1.1-RC1

Minimized code

trait MyTypeclass[F[_]]
def f[F[_]: MyTypeclass, U](t:F[U]) = ???

type MyType[T] = String
implicit val impl:MyTypeclass[MyType] = ???

val stream:Option[MyType[Int]] = ???
for {
  keyStream <- stream
  x = 17 // uncommenting this line makes it compile
} yield f(keyStream)

https://scastie.scala-lang.org/t7ixyW5qQtqxSnQWGIsQDw

Output

no implicit argument of type Playground.MyTypeclass[Comparable] was found
for an implicit parameter of method f in object Playground

Expectation

Should compile like in Scala 2.13

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