diff options
author | Paul Phillips <paulp@improving.org> | 2010-01-20 00:27:53 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-01-20 00:27:53 +0000 |
commit | 08013877acb1155fa46398988efaa2cab21f78ae (patch) | |
tree | b037368cce1f0d0a3623e2b0e43d83b3be2d9832 /src/compiler/scala/tools/nsc/transform/LazyVals.scala | |
parent | 556813ccdf7b3d78ef0a43c90699bb552f8a97fe (diff) | |
download | scala-08013877acb1155fa46398988efaa2cab21f78ae.tar.gz scala-08013877acb1155fa46398988efaa2cab21f78ae.tar.bz2 scala-08013877acb1155fa46398988efaa2cab21f78ae.zip |
Made some cosmetic but clarity-increasing chang...
Made some cosmetic but clarity-increasing changes to a few files.
Primarily, used corresponds where possible rather than zipped.forall.
Added isImplicit and isJava to MethodType so the relevant subtypes
could be determined without the hideous isInstanceOf checks. Review by
odersky.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/LazyVals.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/LazyVals.scala | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/LazyVals.scala b/src/compiler/scala/tools/nsc/transform/LazyVals.scala index 03339163a1..23dda60f87 100644 --- a/src/compiler/scala/tools/nsc/transform/LazyVals.scala +++ b/src/compiler/scala/tools/nsc/transform/LazyVals.scala @@ -95,13 +95,11 @@ abstract class LazyVals extends Transform with ast.TreeDSL { val bmps = bitmaps(methSym) map (ValDef(_, ZERO)) - // Martin to Iulian: Don't we need to compare lengths here? - def isMatch(params: List[Ident]) = (params.tail, methSym.tpe.params).zipped forall (_.tpe == _.tpe) + def isMatch(params: List[Ident]) = (params.tail corresponds methSym.tpe.params)(_.tpe == _.tpe) // @PP: corresponds if (bmps.isEmpty) rhs else rhs match { case Block(assign, l @ LabelDef(name, params, rhs1)) if name.toString == ("_" + methSym.name) && isMatch(params) => - val sym = l.symbol Block(assign, treeCopy.LabelDef(l, name, params, typed(prependStats(bmps, rhs1)))) case _ => prependStats(bmps, rhs) |