-
Notifications
You must be signed in to change notification settings - Fork 21
Inconsistent null equality check for primitive types #9671
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9671?orig=1 |
Dmytro Kondratiuk (dk14) said: aconst_null aconst_null So compiler just forgets to add unbox/box in the first case |
@szeiger said: |
@lrytz said: |
@lrytz said: def f1(a: Any) = "" + a
f1(null.asInstanceOf[Int]) first replaces the cast by an |
@lrytz said: |
Same for Int and Long.
At least, the warning message seems incorrect, regardless that the boxing/unboxing logic might be fine (?)
The text was updated successfully, but these errors were encountered: