-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix #4030: avoid adding duplicate binders #4034
Conversation
tests/pos/i4030.scala
Outdated
sealed trait Root[T] | ||
case object C1 extends Root[Int] | ||
case object C2 extends Root[String] | ||
//case class C3[X, Y]() extends Root[X|Y|(X => X)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s drop the comments I guess...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All comments removed.
tests/pos/i4030.scala
Outdated
def f[A <: Seq[_], B, Foo >: A => B](v: Root[Foo], u: Root[Foo]) = (v, u) match { | ||
//case C1 => | ||
//case C2 => | ||
case (C3(), C3()) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, shouldn’t there be a checkfile for the exhaustivity warning triggered by this code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the test to be a patmat test and added a check file. For pos/neg tests, we don't have check files.
case _ => | ||
unapp | ||
def addBinders(unapp: Tree, bound: List[Symbol]) = { | ||
var remain = bound.toSet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this in case TypeApply(fn, args) =>
Fix #4030: avoid adding duplicate binders