summaryrefslogtreecommitdiff
path: root/test/files/pos/t7226.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-7226 Fix inference regression caused by TypeVar equality.Jason Zaugg2013-03-091-0/+26
TypeVars, being mutable creatures, mustn't have structural equality/hashing, otherwise TypeRefs that differ only by having distinct TypeVars as components get wrongly uniqued together. The reported bug showed the disaterous consequences: constraints from the `C?[Int]` in the return type applied to the `?C[?A]` in the parameter list. This commit overrides `equals` and `hashCode` in `TypeVar` to use reference equality. An alternative fix would be to drop the `case`-ness of the class, as was the case before 0cde930b when this regressed.