diff options
author | Paul Phillips <paulp@improving.org> | 2009-10-08 19:08:46 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-10-08 19:08:46 +0000 |
commit | 5be7c2213b9743e439823c3251dd087c18595b14 (patch) | |
tree | 3deecd04448d2cc00e8cb50f127e7e39e48b6a50 /src/compiler/scala/tools/nsc/ast/TreeDSL.scala | |
parent | 9cf9ab263b60ed2ae8ff5c7710a7f59695fc92e7 (diff) | |
download | scala-5be7c2213b9743e439823c3251dd087c18595b14.tar.gz scala-5be7c2213b9743e439823c3251dd087c18595b14.tar.bz2 scala-5be7c2213b9743e439823c3251dd087c18595b14.zip |
1) Removed a bunch of unnecessary calls to the ...
1) Removed a bunch of unnecessary calls to the typer. 2) Reworked
exhaustiveness checking so I can tell what it's doing. 3) Cruft falls
away left, right, and center.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeDSL.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreeDSL.scala | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeDSL.scala b/src/compiler/scala/tools/nsc/ast/TreeDSL.scala index c932b7cfb3..7093af1cd6 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeDSL.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeDSL.scala @@ -20,13 +20,8 @@ trait TreeDSL { import gen.{ scalaDot } object CODE { - // clarity aliases - type TreeFunction1 = Tree => Tree - type TreeFunction2 = (Tree, Tree) => Tree - type BooleanTreeFunction2 = (Tree, Tree) => Boolean - // Add a null check to a Tree => Tree function - def nullSafe[T](f: TreeFunction1, ifNull: Tree): TreeFunction1 = + def nullSafe[T](f: Tree => Tree, ifNull: Tree): Tree => Tree = tree => IF (tree MEMBER_== NULL) THEN ifNull ELSE f(tree) // XXX these two are in scala.PartialFunction now, just have to |