diff options
author | Seth Tisue <seth@tisue.net> | 2015-11-20 13:34:05 -0500 |
---|---|---|
committer | Seth Tisue <seth@tisue.net> | 2015-11-20 13:34:05 -0500 |
commit | 543ebf6a0a930ec9e85bba1a4ad6df26ba541e6e (patch) | |
tree | 41f3482a91ba3669f19fe309e07c0800dd6ec71b | |
parent | d3667465f42590e4d39cef557f48d0cd050dec42 (diff) | |
parent | e01f2a1c6524f29e6f4b4d6a977f36c6c0fa2759 (diff) | |
download | scala-543ebf6a0a930ec9e85bba1a4ad6df26ba541e6e.tar.gz scala-543ebf6a0a930ec9e85bba1a4ad6df26ba541e6e.tar.bz2 scala-543ebf6a0a930ec9e85bba1a4ad6df26ba541e6e.zip |
Merge pull request #4852 from soc/topic/misc-warning-fixes
Fix some small warnings that pop up on every compile
3 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Constructors.scala b/src/compiler/scala/tools/nsc/transform/Constructors.scala index f5eca11c98..aef2817db7 100644 --- a/src/compiler/scala/tools/nsc/transform/Constructors.scala +++ b/src/compiler/scala/tools/nsc/transform/Constructors.scala @@ -167,7 +167,7 @@ abstract class Constructors extends Statics with Transform with ast.TreeDSL { // no point traversing further once omittables is empty, all candidates ruled out already. object detectUsages extends Traverser { - lazy val bodyOfOuterAccessor = defs collect { case dd: DefDef if omittableOuterAcc(dd.symbol) => dd.symbol -> dd.rhs } toMap + lazy val bodyOfOuterAccessor = defs.collect{ case dd: DefDef if omittableOuterAcc(dd.symbol) => dd.symbol -> dd.rhs }.toMap override def traverse(tree: Tree): Unit = if (omittables.nonEmpty) { diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala index 01714e22fd..a943b53bf7 100644 --- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala +++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala @@ -398,7 +398,7 @@ abstract class LambdaLift extends InfoTransform { case DefDef(_, _, _, vparams :: _, _, _) => val ps = freeParams(sym) - if (ps isEmpty) tree + if (ps.isEmpty) tree else { val paramSyms = cloneSymbols(ps).map(_.setFlag(PARAM)) val paramDefs = ps map (p => ValDef(p) setPos tree.pos setType NoType) @@ -410,7 +410,7 @@ abstract class LambdaLift extends InfoTransform { case ClassDef(_, _, _, _) => val freeParamDefs = freeParams(sym) map (p => ValDef(p) setPos tree.pos setType NoType) - if (freeParamDefs isEmpty) tree + if (freeParamDefs.isEmpty) tree else deriveClassDef(tree)(impl => deriveTemplate(impl)(_ ::: freeParamDefs)) case _ => tree diff --git a/src/library/scala/collection/convert/WrapAsScala.scala b/src/library/scala/collection/convert/WrapAsScala.scala index a96cccc6ed..ee161dcc87 100644 --- a/src/library/scala/collection/convert/WrapAsScala.scala +++ b/src/library/scala/collection/convert/WrapAsScala.scala @@ -139,13 +139,13 @@ trait WrapAsScala { * If the Java `Map` was previously obtained from an implicit or * explicit call of `mapAsScalaMap(scala.collection.mutable.Map)` then * the original Scala Map will be returned. - * + * * If the wrapped map is synchronized (e.g. from `java.util.Collections.synchronizedMap`), - * it is your responsibility to wrap all + * it is your responsibility to wrap all * non-atomic operations with `underlying.synchronized`. * This includes `get`, as `java.util.Map`'s API does not allow for an * atomic `get` when `null` values may be present. - * + * * @param m The Map to be converted. * @return A Scala mutable Map view of the argument. */ @@ -170,7 +170,7 @@ trait WrapAsScala { */ implicit def mapAsScalaConcurrentMap[A, B](m: juc.ConcurrentMap[A, B]): concurrent.Map[A, B] = m match { case null => null - case cmw: ConcurrentMapWrapper[A, B] => cmw.underlying + case cmw: ConcurrentMapWrapper[_, _] => cmw.underlying case _ => new JConcurrentMapWrapper(m) } |