Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not call OptionOps#fold in Scala 2.10 #476

Closed
xuwei-k opened this issue Aug 20, 2013 · 3 comments
Closed

can not call OptionOps#fold in Scala 2.10 #476

xuwei-k opened this issue Aug 20, 2013 · 3 comments
Milestone

Comments

@xuwei-k
Copy link
Member

xuwei-k commented Aug 20, 2013

https://github.com/scala/scala/blob/v2.10.2/src/library/scala/Option.scala#L147-L157

Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_25).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import scalaz._,Scalaz._
import scalaz._
import Scalaz._

scala> Option(1).fold(identity, 0)
<console>:14: error: too many arguments for method fold: (ifEmpty: => B)(f: Int => B)B
              Option(1).fold(identity, 0)
                            ^

@deprecated("use option.cata or option.some(f).none(default)", "7.1.0") and remove?

@mpilquist
Copy link
Contributor

+1

1 similar comment
@larsrh
Copy link
Contributor

larsrh commented Aug 20, 2013

👍

@larsrh
Copy link
Contributor

larsrh commented Aug 25, 2013

Fixed with #488.

@larsrh larsrh closed this as completed Aug 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants