Skip to content

Can't compare Scala and Java Booleans #4180

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

Closed
Arthurm1 opened this issue Mar 25, 2018 · 0 comments
Closed

Can't compare Scala and Java Booleans #4180

Arthurm1 opened this issue Mar 25, 2018 · 0 comments

Comments

@Arthurm1
Copy link

object Bar {
  true == (true: java.lang.Boolean)
}

gives

-- Error: /tmp/scastie843852333271942738/src/main/scala/main.scala:3:2 ---------
3 |  true == (true: java.lang.Boolean)
  |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |  Values of types Boolean and Boolean cannot be compared with == or !=
smarter added a commit to dotty-staging/dotty that referenced this issue Mar 25, 2018
smarter added a commit that referenced this issue Mar 26, 2018
Fix #4180: Can't compare Scala and Java Booleans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants