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

Unrelated types warning not generated in certain circumstances #8939

Closed
scabug opened this issue Oct 27, 2014 · 2 comments
Closed

Unrelated types warning not generated in certain circumstances #8939

scabug opened this issue Oct 27, 2014 · 2 comments

Comments

@scabug
Copy link

scabug commented Oct 27, 2014

val l1: List[Option[Int]] = List(Some(1))

l1.find(_ == 1) // Generates warning, as it should

case class UserId(value: Int)

case class User(id: Option[UserId], other: Int)

val l2: List[User] = List(User(Some(UserId(1)), 2))

l2.find(_.id == UserId(1)) // Does not generate warning, even though types don't match

@scabug
Copy link
Author

scabug commented Oct 27, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8939?orig=1
Reporter: Artur Soler

@SethTisue
Copy link
Member

based on scala/scala#6486 it looks like this is wontfix

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

3 participants