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
In 2.13.8, this optimization occurs without any ceremony on our part.
objectThunk {
defasFunction0[A](thunk: =>A):Function0[A] = () => thunk
}
"Thunk.asFunction0" should {
"return the same function" in {
vari=0valf= () => i +=1Thunk.asFunction0(f()) eq f // true
}
}
The text was updated successfully, but these errors were encountered:
Initially discussed in:
Thunk.asFunction0
is broken in Scala 3 nightly typelevel/cats-effect#2816after being discovered in:
sbt-dotty
in community build #14395 (comment)Additional background:
IO.delay
is broken in Scala 3 typelevel/cats-effect#2225IO.delay
typelevel/cats-effect#2226Minimized example
Output
3.0.2
3.1.3-RC1-bin-20220207-74c2954-NIGHTLY
Following changes in:
Expectation
In 2.13.8, this optimization occurs without any ceremony on our part.
The text was updated successfully, but these errors were encountered: