From 3e1241caeca9af5b05922d38bed1b0480e6da56d Mon Sep 17 00:00:00 2001 From: Antonio Cunei Date: Fri, 15 Jan 2010 16:58:28 +0000 Subject: Reverted over-zealous replacement of 'PartialFu... Reverted over-zealous replacement of 'PartialFunction' with '=>?'. --- src/compiler/scala/tools/nsc/symtab/Definitions.scala | 2 +- src/compiler/scala/tools/nsc/transform/CleanUp.scala | 2 +- src/compiler/scala/tools/nsc/transform/UnCurry.scala | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/compiler') 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 { -- cgit v1.2.3