diff options
author | Paul Phillips <paulp@improving.org> | 2009-12-22 20:11:29 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-12-22 20:11:29 +0000 |
commit | 361a7a40d35e09d7f622fcafd28531172a139e0e (patch) | |
tree | 53047ba64d5b56cc75b8b67500ad346c398437d6 /src/compiler | |
parent | d32b5bc758e9203ed66b2517d2abc2530385c1dc (diff) | |
download | scala-361a7a40d35e09d7f622fcafd28531172a139e0e.tar.gz scala-361a7a40d35e09d7f622fcafd28531172a139e0e.tar.bz2 scala-361a7a40d35e09d7f622fcafd28531172a139e0e.zip |
Took full advantage of the new =>? alias for th...
Took full advantage of the new =>? alias for the superverbosely named
PartialFunction by renaming every usage of the latter except when in
comments.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Definitions.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/CleanUp.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/UnCurry.scala | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala index e1cf7a5a7e..7a77095293 100644 --- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala +++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala @@ -19,7 +19,7 @@ trait Definitions { // Working around bug #2133 private object definitionHelpers { - def cond[T](x: T)(f: PartialFunction[T, Boolean]) = (f isDefinedAt x) && f(x) + def cond[T](x: T)(f: T =>? Boolean) = (f isDefinedAt x) && f(x) } import definitionHelpers._ diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala index cf217dcd23..09ed32253a 100644 --- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala +++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala @@ -280,7 +280,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL { val testForBoolean: Tree = (qual IS_OBJ BoxedBooleanClass.tpe) val testForNumberOrBoolean = testForNumber OR testForBoolean - val getPrimitiveReplacementForStructuralCall: PartialFunction[Name, (Symbol, Tree)] = { + val getPrimitiveReplacementForStructuralCall: Name =>? (Symbol, Tree) = { val testsForNumber = Map() ++ List( nme.UNARY_+ -> "positive", nme.UNARY_- -> "negate", diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index 8c129f66d7..8ea0b69049 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -296,11 +296,11 @@ abstract class UnCurry extends InfoTransform with TypingTransformers { * } * new $anon() * - * transform a function node (x => body) of type PartialFunction[T, R] where + * transform a function node (x => body) of type T =>? R where * body = expr match { case P_i if G_i => E_i }_i=1..n * to: * - * class $anon() extends Object() with PartialFunction[T, R] with ScalaObject { + * class $anon() extends Object() with T =>? R with ScalaObject { * def apply(x: T): R = (expr: @unchecked) match { * { case P_i if G_i => E_i }_i=1..n * def isDefinedAt(x: T): boolean = (x: @unchecked) match { |