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

regression: overloaded == creates spurious warnings #5175

Closed
scabug opened this issue Nov 10, 2011 · 4 comments
Closed

regression: overloaded == creates spurious warnings #5175

scabug opened this issue Nov 10, 2011 · 4 comments
Assignees

Comments

@scabug
Copy link

@scabug scabug commented Nov 10, 2011

Works in 2.9.x fails in trunk.

object Test {
  def ==(p: Phase): Int = 0

  def foo {
    ==(new Phase())
  }
}

class Phase

leads to

Test.scala:6: warning: object Test and Phase are unrelated: they will most likely never compare equal
    ==(new Phase())
      ^
one warning found

I guess it gets confused about the receiver of == and doesn't take into consideration that it can be overloaded.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Nov 10, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5175?orig=1
Reporter: @hubertp
Affected Versions: 2.10.0

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Nov 10, 2011

@hubertp said:
btw, the bytecode is correct.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Nov 10, 2011

@soc said:
Could this be related to the changes made in SI-4766?

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Dec 28, 2011

@paulp said:
Fixed in 33ab1a574af .

@scabug scabug closed this Dec 28, 2011
@scabug scabug added the critical label Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.