Closed
Description
Minimized code
trait Foo[A]
object Example {
given as Foo[Int] {
}
def foo[A : Foo]: A => A = identity
def foo2[A](using Foo[A]): A => A = identity // this definition works!
def test(): Unit = {
foo(32) // fails to compile because it thinks `32` is an implicit parameter
}
}
Output
[error] 107 | foo(32)
[error] | ^^
[error] | Found: (32 : Int)
[error] | Required: profunctor.optics.core.Foo[A]
[error] |
[error] | where: A is a type variable
Expectation
Both of these expressions should be equivalent ideally.