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

not support BinaryOperator ??? #10243

Closed
scabug opened this issue Mar 21, 2017 · 3 comments
Closed

not support BinaryOperator ??? #10243

scabug opened this issue Mar 21, 2017 · 3 comments

Comments

@scabug
Copy link

scabug commented Mar 21, 2017

can compile:
def combiner: BiFunction[Int, Int, Int] = (one: Int, other: Int) => one + other

can not compile:
def combiner: BinaryOperator[Int] = (one: Int, other: Int) => one + other

@scabug
Copy link
Author

scabug commented Mar 21, 2017

Imported From: https://issues.scala-lang.org/browse/SI-10243?orig=1
Reporter: Hank Lu (hank.whu)
Affected Versions: 2.12.1

@scabug
Copy link
Author

scabug commented Mar 21, 2017

@ghik said:
Both of these work just fine in Scala 2.12.1

Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions for evaluation. Or try :help.

scala> import java.util.function._
import java.util.function._

scala> def combiner: BinaryOperator[Int] = (one: Int, other: Int) => one + other
combiner: java.util.function.BinaryOperator[Int]

scala> def combiner: BiFunction[Int, Int, Int] = (one: Int, other: Int) => one + other
combiner: java.util.function.BiFunction[Int,Int,Int]

@scabug scabug closed this as completed Mar 21, 2017
@scabug
Copy link
Author

scabug commented Mar 21, 2017

@adriaanm said:
Thanks, Roman! Hank, let us know if you're still experiencing this issue, but please provide a full reproduction.

@scabug scabug added the needinfo label Apr 7, 2017
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

1 participant