diff options
author | buraq <buraq@epfl.ch> | 2005-06-21 13:48:27 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2005-06-21 13:48:27 +0000 |
commit | fdd8c6597fd98b7074fc4f688f55b166b5666ed4 (patch) | |
tree | 5370f03901e0c5ff63c8e42dd8bdfa2856ccc5e5 | |
parent | 7d4c3a7052d96e1fa53b1fa4201d345873aaf878 (diff) | |
download | scala-fdd8c6597fd98b7074fc4f688f55b166b5666ed4.tar.gz scala-fdd8c6597fd98b7074fc4f688f55b166b5666ed4.tar.bz2 scala-fdd8c6597fd98b7074fc4f688f55b166b5666ed4.zip |
removed . from .match
fixed mistake in isRegular call
-rw-r--r-- | sources/scala/tools/nsc/matching/TransMatcher.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/scala/tools/nsc/matching/TransMatcher.scala b/sources/scala/tools/nsc/matching/TransMatcher.scala index 6986c6de83..3cdcaa42db 100644 --- a/sources/scala/tools/nsc/matching/TransMatcher.scala +++ b/sources/scala/tools/nsc/matching/TransMatcher.scala @@ -160,7 +160,7 @@ with RightTracers { */ def removeNilVariables( cd: CaseDef ): CaseDef = { var nilVars:List[Symbol] = Nil; - def remove(pat: Tree): Tree = pat.match { + def remove(pat: Tree): Tree = pat match { case Alternative( _ ) => pat /* no bind/var allowed! */ case Star( _ ) => pat /* no bind/var allowed! */ case Bind( id, empt @ Sequence(List())) => @@ -183,7 +183,7 @@ with RightTracers { case _ => scala.Predef.error("unknown node"+pat.getClass()); } - cd.match { + cd match { case CaseDef(pat, guard, body) => val npat = remove(pat); val nbody = { @@ -204,7 +204,7 @@ with RightTracers { // 1. is there a regular pattern? - val containsReg = cases.exists { isRegular }; + val containsReg = cases.exists { x => isRegular(x.pat) }; // @todo: remove unused variables |