|
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.
|