@@ -6,8 +6,8 @@ import core._
66import Types ._
77import Contexts ._
88import Flags ._
9- import ast .Trees . _
10- import ast . tpd
9+ import ast ._
10+ import Trees . _
1111import Decorators ._
1212import Symbols ._
1313import StdNames ._
@@ -299,16 +299,15 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
299299 if (res) Typ (and, true ) else Empty
300300 }
301301
302- /* Whether the extractor is irrefutable */
302+ /** Whether the extractor is irrefutable */
303303 def irrefutable (unapp : Tree ): Boolean = {
304304 // TODO: optionless patmat
305305 unapp.tpe.widen.finalResultType.isRef(scalaSomeClass) ||
306306 (unapp.symbol.is(Synthetic ) && unapp.symbol.owner.linkedClass.is(Case )) ||
307307 productArity(unapp.tpe.widen.finalResultType) > 0
308308 }
309309
310- /** Return the space that represents the pattern `pat`
311- */
310+ /** Return the space that represents the pattern `pat` */
312311 def project (pat : Tree ): Space = pat match {
313312 case Literal (c) =>
314313 if (c.value.isInstanceOf [Symbol ])
@@ -326,9 +325,9 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
326325 if (fun.symbol.owner == scalaSeqFactoryClass)
327326 projectSeq(pats)
328327 else
329- Prod (pat.tpe.stripAnnots, fun.tpe, fun.symbol, projectSeq(pats) :: Nil , irrefutable(fun))
328+ Prod (erase( pat.tpe.stripAnnots) , fun.tpe, fun.symbol, projectSeq(pats) :: Nil , irrefutable(fun))
330329 else
331- Prod (pat.tpe.stripAnnots, fun.tpe, fun.symbol, pats.map(project), irrefutable(fun))
330+ Prod (erase( pat.tpe.stripAnnots) , fun.tpe, fun.symbol, pats.map(project), irrefutable(fun))
332331 case Typed (pat @ UnApply (_, _, _), _) => project(pat)
333332 case Typed (expr, tpt) =>
334333 Typ (erase(expr.tpe.stripAnnots), true )
0 commit comments