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
traitCobjectC:defprovide:Option[C] =Some(newC {})
defconsume(arg: Int)(usingC):Unit= ()
valresult1=for {
givenC<-C.provide
a = consume(42) // Error: no implicit of type C
} yield a
valresult2=for {
c <-C.provide
a = {
givenC= c
consume(42) // this works fine
}
} yield a
Expectation
given argument would be implicitly passed down to a method that expects it
The text was updated successfully, but these errors were encountered:
Compiler version
Scala 3.1.1-2
Minimized code
Expectation
given argument would be implicitly passed down to a method that expects it
The text was updated successfully, but these errors were encountered: