Skip to content

Commit 543ebf6

Browse files
committed
Merge pull request scala#4852 from soc/topic/misc-warning-fixes
Fix some small warnings that pop up on every compile
2 parents d366746 + e01f2a1 commit 543ebf6

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/compiler/scala/tools/nsc/transform/Constructors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ abstract class Constructors extends Statics with Transform with ast.TreeDSL {
167167

168168
// no point traversing further once omittables is empty, all candidates ruled out already.
169169
object detectUsages extends Traverser {
170-
lazy val bodyOfOuterAccessor = defs collect { case dd: DefDef if omittableOuterAcc(dd.symbol) => dd.symbol -> dd.rhs } toMap
170+
lazy val bodyOfOuterAccessor = defs.collect{ case dd: DefDef if omittableOuterAcc(dd.symbol) => dd.symbol -> dd.rhs }.toMap
171171

172172
override def traverse(tree: Tree): Unit =
173173
if (omittables.nonEmpty) {

src/compiler/scala/tools/nsc/transform/LambdaLift.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ abstract class LambdaLift extends InfoTransform {
398398
case DefDef(_, _, _, vparams :: _, _, _) =>
399399
val ps = freeParams(sym)
400400

401-
if (ps isEmpty) tree
401+
if (ps.isEmpty) tree
402402
else {
403403
val paramSyms = cloneSymbols(ps).map(_.setFlag(PARAM))
404404
val paramDefs = ps map (p => ValDef(p) setPos tree.pos setType NoType)
@@ -410,7 +410,7 @@ abstract class LambdaLift extends InfoTransform {
410410
case ClassDef(_, _, _, _) =>
411411
val freeParamDefs = freeParams(sym) map (p => ValDef(p) setPos tree.pos setType NoType)
412412

413-
if (freeParamDefs isEmpty) tree
413+
if (freeParamDefs.isEmpty) tree
414414
else deriveClassDef(tree)(impl => deriveTemplate(impl)(_ ::: freeParamDefs))
415415

416416
case _ => tree

src/library/scala/collection/convert/WrapAsScala.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ trait WrapAsScala {
139139
* If the Java `Map` was previously obtained from an implicit or
140140
* explicit call of `mapAsScalaMap(scala.collection.mutable.Map)` then
141141
* the original Scala Map will be returned.
142-
*
142+
*
143143
* If the wrapped map is synchronized (e.g. from `java.util.Collections.synchronizedMap`),
144-
* it is your responsibility to wrap all
144+
* it is your responsibility to wrap all
145145
* non-atomic operations with `underlying.synchronized`.
146146
* This includes `get`, as `java.util.Map`'s API does not allow for an
147147
* atomic `get` when `null` values may be present.
148-
*
148+
*
149149
* @param m The Map to be converted.
150150
* @return A Scala mutable Map view of the argument.
151151
*/
@@ -170,7 +170,7 @@ trait WrapAsScala {
170170
*/
171171
implicit def mapAsScalaConcurrentMap[A, B](m: juc.ConcurrentMap[A, B]): concurrent.Map[A, B] = m match {
172172
case null => null
173-
case cmw: ConcurrentMapWrapper[A, B] => cmw.underlying
173+
case cmw: ConcurrentMapWrapper[_, _] => cmw.underlying
174174
case _ => new JConcurrentMapWrapper(m)
175175
}
176176

0 commit comments

Comments
 (0)