diff options
Diffstat (limited to 'src/reflect/scala/reflect/internal/ReificationSupport.scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/ReificationSupport.scala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/reflect/scala/reflect/internal/ReificationSupport.scala b/src/reflect/scala/reflect/internal/ReificationSupport.scala index d393a841b7..30f2efd7e3 100644 --- a/src/reflect/scala/reflect/internal/ReificationSupport.scala +++ b/src/reflect/scala/reflect/internal/ReificationSupport.scala @@ -287,6 +287,8 @@ trait ReificationSupport { self: SymbolTable => val evdefs = gvdefs.zip(lvdefs).map { case (gvdef @ ValDef(_, _, tpt: TypeTree, _), ValDef(_, _, _, rhs)) => copyValDef(gvdef)(tpt = tpt.original, rhs = rhs) + case (tr1, tr2) => + throw new MatchError((tr1, tr2)) } val edefs = evdefs ::: etdefs if (ctorMods.isTrait) @@ -726,7 +728,7 @@ trait ReificationSupport { self: SymbolTable => protected object FilterCall { def unapply(tree: Tree): Option[(Tree,Tree)] = tree match { case Apply(Select(obj, nme.withFilter | nme.filter), arg :: Nil) => - Some(obj, arg) + Some((obj, arg)) case _ => None } } @@ -760,10 +762,10 @@ trait ReificationSupport { self: SymbolTable => def unapply(tree: Tree) = tree match { case SyntacticApplied(SyntacticTypeApplied(sel @ Select(lhs, meth), _), (f :: Nil) :: Nil) if name == meth && sel.hasAttachment[ForAttachment.type] => - Some(lhs, f) + Some((lhs, f)) case SyntacticApplied(SyntacticTypeApplied(sel @ Select(lhs, meth), _), (f :: Nil) :: _ :: Nil) if name == meth && sel.hasAttachment[ForAttachment.type] => - Some(lhs, f) + Some((lhs, f)) case _ => None } } @@ -1132,7 +1134,7 @@ trait ReificationSupport { self: SymbolTable => def apply(tpt: Tree, where: List[Tree]): ExistentialTypeTree = ExistentialTypeTree(tpt, where.map { case md: MemberDef => md - case tree => throw new IllegalArgumentException("$tree is not legal forSome definition") + case tree => throw new IllegalArgumentException(s"$tree is not legal forSome definition") }) def unapply(tree: Tree): Option[(Tree, List[MemberDef])] = tree match { case MaybeTypeTreeOriginal(ExistentialTypeTree(tpt, where)) => |