summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools
diff options
context:
space:
mode:
authorAntonio Cunei <antonio.cunei@epfl.ch>2010-01-15 16:58:28 +0000
committerAntonio Cunei <antonio.cunei@epfl.ch>2010-01-15 16:58:28 +0000
commit3e1241caeca9af5b05922d38bed1b0480e6da56d (patch)
tree56ab1c1e104498ce49ef57c86dd453143955b48d /src/compiler/scala/tools
parentb0e6451e78740747da641d3c4b7f524f102810f9 (diff)
downloadscala-3e1241caeca9af5b05922d38bed1b0480e6da56d.tar.gz
scala-3e1241caeca9af5b05922d38bed1b0480e6da56d.tar.bz2
scala-3e1241caeca9af5b05922d38bed1b0480e6da56d.zip
Reverted over-zealous replacement of 'PartialFu...
Reverted over-zealous replacement of 'PartialFunction' with '=>?'.
Diffstat (limited to 'src/compiler/scala/tools')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/CleanUp.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala4
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 7a77095293..e1cf7a5a7e 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: T =>? Boolean) = (f isDefinedAt x) && f(x)
+ def cond[T](x: T)(f: PartialFunction[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 09ed32253a..cf217dcd23 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: Name =>? (Symbol, Tree) = {
+ val getPrimitiveReplacementForStructuralCall: PartialFunction[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 fd5dd0f9a3..dc475b4173 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 T =>? R where
+ * transform a function node (x => body) of type PartialFunction[T, R] where
* body = expr match { case P_i if G_i => E_i }_i=1..n
* to:
*
- * class $anon() extends Object() with T =>? R with ScalaObject {
+ * class $anon() extends Object() with PartialFunction[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 {