From 7943084a2d06e21f112b4efd0ab70ec6e38ce510 Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Fri, 5 Jul 2013 14:37:48 +0200 Subject: SI-7624 Fix -feature warnings and build with -feature I added a language.existential import to LazyCombiner.scala which should not be necessary, but causes a spurious warning otherwise: scala/src/library/scala/collection/parallel/mutable/LazyCombiner.scala:33: warning: the existential type scala.collection.parallel.mutable.LazyCombiner[_$1,_$2,_$3] forSome { type _$1; type _$2; type _$3 <: scala.collection.generic.Growable[_$1] with scala.collection.generic.Sizing }, which cannot be expressed by wildcards, should be enabled by making the implicit value scala.language.existentials visible. if (other.isInstanceOf[LazyCombiner[_, _, _]]) { ^ I created ticket SI-7750 to track this issue. --- src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 1 + src/compiler/scala/tools/nsc/typechecker/Infer.scala | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 1b6443a4cb..f3a22a2cee 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -1340,6 +1340,7 @@ trait Contexts { self: Analyzer => } object ContextMode { + import scala.language.implicitConversions private implicit def liftIntBitsToContextState(bits: Int): ContextMode = apply(bits) def apply(bits: Int): ContextMode = new ContextMode(bits) final val NOmode: ContextMode = 0 diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 06892053fa..8ca0d82e93 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -700,7 +700,7 @@ trait Infer extends Checkable { tp nonPrivateMember nme.apply match { case NoSymbol => tp case sym if !sym.isOverloaded && sym.isPublic => OverloadedType(tp, sym.alternatives) - case sym => OverloadedType(tp, sym filter (_.isPublic) alternatives) + case sym => OverloadedType(tp, sym.filter(_.isPublic).alternatives) } } -- cgit v1.2.3