You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
traitFoo[A]
objectExample {
givenasFoo[Int] {
}
deffoo[A:Foo]:A=>A= identity
deffoo2[A](usingFoo[A]):A=>A= identity // this definition works!deftest():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 typevariable
Expectation
Both of these expressions should be equivalent ideally.