Commit 24c0ee6
committed
Don't confuse MethodTypes and PolyTypes in type comparer
I assumed the existing tests were already sufficient to avoid confusion before
we try a substitution of one for the other, but was wrong in the case where
both sides are riddled with errors.
Test case (too long/fuzzy to be included in regression tests):
case class i0[i1, i4](i4: i1)
object i4 {
implicit def i4[i1: i0](i4: i1): i1
def i4[i4[_], i4[_], i4[i4]](i4: i1[i4]): i4[i4] = null
}
class i1 extends i4 {
case _ =>
}
val i1 = new i0 {
type i1[i4] = i4 with i0[i4]
trait i1 extends i4 {
type i1[i4] = i1 type i4 = i4#i4 def i4[i4 >: i4](i4: => i4): i4.i4[_ <: i4] = i4
i4(i1, i4: i4)
def unapply(i2: i4) = sys.error("")
}
trait i4
trait throw {
val i3: i4 = i4(5, i1: i1,
i4: i4)
def i3: i4[Int] = i1(null: Any) i3(0, i1())
println(i3 <= i4)
}
object i1 {
implicit def i1(i4: i4): Int
def i1[@specialized i4 <: i4[i4]](i1: i4): i4[Int]
def i1[@specialized i4, i4 <: i1](i4: i4): i4[i1[i4]] = new i4[i1] {
val i1 = (new i2.i1
}
}1 parent 75013f1 commit 24c0ee6
1 file changed
+15
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
531 | 531 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 532 | + | |
| 533 | + | |
539 | 534 | | |
540 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
| |||
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
576 | 583 | | |
577 | 584 | | |
578 | 585 | | |
| |||
0 commit comments