summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala2
-rw-r--r--src/library/scala/reflect/Invocation.scala16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index ca78ac88e8..193ff216e0 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -242,7 +242,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
* @param str comma-separated string of distinct primitive types.
*/
def parseTypes(str: String): List[Type] = {
- if (str.trim.isEmpty)
+ if (str.trim == "")
List()
else {
val buf = new mutable.ListBuffer[Type]
diff --git a/src/library/scala/reflect/Invocation.scala b/src/library/scala/reflect/Invocation.scala
index 3e757950d4..d0ef9676d4 100644
--- a/src/library/scala/reflect/Invocation.scala
+++ b/src/library/scala/reflect/Invocation.scala
@@ -65,7 +65,7 @@ object Invocation
* an apply method, which packages the method arguments. The type parameter
* is the method's expected result type.
*/
- class SymbolWithArguments[R](val sym: ScalaSymbol, val args: PrimitivePreserver[_]*) {
+ class SymbolWithArguments(val sym: ScalaSymbol, val args: PrimitivePreserver[_]*) {
def getArgs = args map (_.value.asInstanceOf[AnyRef])
def getArgTypes = args.toList map (_.clazz)
def argsMatch(m: JMethod) =
@@ -85,10 +85,10 @@ object Invocation
}
class RichSymbol(sym: ScalaSymbol) {
- def apply[R](args: PrimitivePreserver[_]*): SymbolWithArguments[R] =
- new SymbolWithArguments[R](sym, args: _*)
+ def apply(args: PrimitivePreserver[_]*): SymbolWithArguments =
+ new SymbolWithArguments(sym, args: _*)
}
- implicit def makeRichSymbol[R](sym: ScalaSymbol): RichSymbol = new RichSymbol(sym)
+ implicit def makeRichSymbol(sym: ScalaSymbol): RichSymbol = new RichSymbol(sym)
/** An implicit on AnyRef provides it with the 'o' method, which is supposed
* to look like a giant '.' and present the feel of method invocation.
@@ -98,13 +98,13 @@ object Invocation
/** Issue call without touching result - returns Any.
*/
- def o(sym: ScalaSymbol): Any = oo(new SymbolWithArguments[Any](sym))
- def o(symApp: SymbolWithArguments[_]): Any = oo(symApp)
+ def o(sym: ScalaSymbol): Any = oo(new SymbolWithArguments(sym))
+ def o(symApp: SymbolWithArguments): Any = oo(symApp)
/** Issue call expecting return type R - casts result to R.
*/
- def oo[R](sym: ScalaSymbol): R = oo[R](new SymbolWithArguments[R](sym))
- def oo[R](symApp: SymbolWithArguments[R]): R = {
+ def oo[R](sym: ScalaSymbol): R = oo[R](new SymbolWithArguments(sym))
+ def oo[R](symApp: SymbolWithArguments): R = {
def method = symApp getMethodOn self
method.invoke(self, symApp.getArgs: _*).asInstanceOf[R]
}