summaryrefslogtreecommitdiff
path: root/test/files/run/t7868.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-7868 Account for numeric widening in match translationJason Zaugg2013-09-231-0/+13
Pattern match translation was unprepared for trees of the shape: (0: Short) match { case A.unapply(<unapply-selector>.toInt) <unapply> (_) => () case _ => () } While a scrutinee is inelibigle for implicit views in order to conform to the type of the extractor call, it is allowed to weakly conform. In this case, the typechecker will add the numeric widening with a `toInt` call. This commit: - Changes treeInfo.Unapplied to recognize this tree shape - Changes spliceApply to recognize and preserve the widening when substituting the unapply selector with the binder - Tests reification of such pattern matches, which also depends on treeInfo.Unapplied.