diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-03 14:16:24 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-05 14:06:11 -0800 |
commit | c40be502a2ed4ef34eff726836b76ed13b03da78 (patch) | |
tree | 7fa10b0706f051da319ae1db7c8a61afcfedb41c /src/compiler/scala/tools/nsc/typechecker/Unapplies.scala | |
parent | 64107de6cba37f796bd7c6b86509cefba312f91d (diff) | |
download | scala-c40be502a2ed4ef34eff726836b76ed13b03da78.tar.gz scala-c40be502a2ed4ef34eff726836b76ed13b03da78.tar.bz2 scala-c40be502a2ed4ef34eff726836b76ed13b03da78.zip |
Consolidated misc collections helper methods.
Streamlining some of our more common operations.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Unapplies.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Unapplies.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala index 4f7e6225e1..9b69c847f6 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala @@ -112,7 +112,7 @@ trait Unapplies extends ast.TreeDSL private def constrParamss(cdef: ClassDef): List[List[ValDef]] = { val DefDef(_, _, _, vparamss, _, _) = treeInfo firstConstructor cdef.impl.body - vparamss map (_ map copyUntyped[ValDef]) + mmap(vparamss)(copyUntyped[ValDef]) } /** The return value of an unapply method of a case class C[Ts] @@ -165,7 +165,7 @@ trait Unapplies extends ast.TreeDSL val cparamss = constrParamss(cdef) atPos(cdef.pos.focus)( DefDef(caseMods, nme.apply, tparams, cparamss, classType(cdef, tparams), - New(classType(cdef, tparams), cparamss map (_ map gen.paramToArg))) + New(classType(cdef, tparams), mmap(cparamss)(gen.paramToArg))) ) } @@ -201,12 +201,12 @@ trait Unapplies extends ast.TreeDSL def paramWithDefault(vd: ValDef) = treeCopy.ValDef(vd, vd.mods | DEFAULTPARAM, vd.name, atPos(vd.pos.focus)(TypeTree() setOriginal vd.tpt), toIdent(vd)) - val paramss = cparamss map (_ map paramWithDefault) + val paramss = mmap(cparamss)(paramWithDefault) val classTpe = classType(cdef, tparams) Some(atPos(cdef.pos.focus)( DefDef(Modifiers(SYNTHETIC), nme.copy, tparams, paramss, classTpe, - New(classTpe, paramss map (_ map toIdent))) + New(classTpe, mmap(paramss)(toIdent))) )) } } |