summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2010-06-29 14:00:36 +0000
committermichelou <michelou@epfl.ch>2010-06-29 14:00:36 +0000
commitb2abe22c97e0c588f7a5f68e970dbc78f87c6b29 (patch)
treed075a2e3f720a5d6ef6216239f7d9c4e97c6bac5 /src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
parent1067f5f55ca0de0035fee3d0179203801f0b4b87 (diff)
downloadscala-b2abe22c97e0c588f7a5f68e970dbc78f87c6b29.tar.gz
scala-b2abe22c97e0c588f7a5f68e970dbc78f87c6b29.tar.bz2
scala-b2abe22c97e0c588f7a5f68e970dbc78f87c6b29.zip
removed warnings (deprecation,unchecked)
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index d9b60b9ca1..1350ab3bb4 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -612,12 +612,12 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
if (settings.debug.value) log("normalizeMember: " + sym.fullName)
if (sym.isMethod && !atPhase(currentRun.typerPhase)(sym.typeParams.isEmpty)) {
var (stps, tps) = splitParams(sym.info.typeParams)
- val unusedStvars = stps -- specializedTypeVars(sym.info).toList
+ val unusedStvars = stps filterNot (specializedTypeVars(sym.info).toList contains)
if (unusedStvars.nonEmpty && currentRun.compiles(sym) && !sym.isSynthetic) {
reporter.warning(sym.pos, "%s %s unused or used in non-specializable positions."
.format(unusedStvars.mkString("", ", ", ""), if (unusedStvars.length == 1) "is" else "are"))
unusedStvars foreach (_.removeAnnotation(SpecializedClass))
- stps = stps -- unusedStvars
+ stps = stps filterNot (unusedStvars contains)
tps = tps ::: unusedStvars
}
val res = sym :: (for (env <- specializations(stps) if needsSpecialization(env, sym)) yield {
@@ -644,8 +644,8 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
} else List(sym)
}
- /** Specialize member `m' w.r.t. to the outer environment and the type parameters of
- * the innermost enclosing class.
+ /** Specialize member `m' w.r.t. to the outer environment and the type
+ * parameters of the innermost enclosing class.
*
* Turns 'private' into 'protected' for members that need specialization.
*
@@ -714,7 +714,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
def checkOverriddenTParams(overridden: Symbol) {
if (currentRun.compiles(overriding))
- for (val (baseTvar, derivedTvar) <- overridden.info.typeParams.zip(overriding.info.typeParams);
+ for ((baseTvar, derivedTvar) <- overridden.info.typeParams.zip(overriding.info.typeParams);
val missing = missingSpecializations(baseTvar, derivedTvar)
if missing.nonEmpty)
reporter.error(derivedTvar.pos,