-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Compiler version
3.0.0
Minimized code
Declaring a result as given
works as expected if I'm flat-mapping to another monadic value. For example:
for
given Int <- List(0)
x <- List(summon[Int])
yield x
Scastie: https://scastie.scala-lang.org/9nPXzZH0QEaVzz3zI4ER8g
However, if the next step in the for-comprehension is a variable, the given is not found. For example:
for
given Int <- List(0)
x = summon[Int]
yield x
Scastie: https://scastie.scala-lang.org/1cuJc8bcS4q59Y5ZoSQ4bw
Output
no implicit argument of type Int was found for parameter x of method summon in object Predef
Expectation
It should compile just like the first example.
slice