diff options
Diffstat (limited to 'src')
3 files changed, 8 insertions, 7 deletions
diff --git a/src/actors/scala/actors/remote/Proxy.scala b/src/actors/scala/actors/remote/Proxy.scala index 73af1edeec..43a43ac99c 100644 --- a/src/actors/scala/actors/remote/Proxy.scala +++ b/src/actors/scala/actors/remote/Proxy.scala @@ -118,7 +118,7 @@ private[remote] case class Apply0(rfun: Function2[AbstractActor, Proxy, Unit]) */ private[remote] class DelegateActor(creator: Proxy, node: Node, name: Symbol, kernel: NetKernel) extends Actor { var channelMap = new mutable.HashMap[Symbol, OutputChannel[Any]] - var sessionMap = new mutable.HashMap[OutputChannel[Any], Symbol] + var sessionMap = new mutable.HashMap[OutputChannel[_], Symbol] def act() { Actor.loop { diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala index ab19660da5..2be031a66f 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala @@ -500,11 +500,6 @@ trait MatchTranslation { // U must have N members _1,..., _N -- the _i are type checked, call their type Ti, // for now only used for case classes -- pretending there's an unapplyProd that's the identity (and don't call it) class ExtractorCallProd(val fun: Tree, val args: List[Tree]) extends ExtractorCall { - // TODO: fix the illegal type bound in pos/t602 -- type inference messes up before we get here: - /*override def equals(x$1: Any): Boolean = ... - val o5: Option[com.mosol.sl.Span[Any]] = // Span[Any] --> Any is not a legal type argument for Span! - */ - private def constructorTp = fun.tpe def isTyped = fun.isTyped diff --git a/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala b/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala index 38a3f18bf8..df4dd3d777 100644 --- a/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala @@ -322,7 +322,13 @@ trait PatternTypers { * * see test/files/../t5189*.scala */ - private def convertToCaseConstructor(tree: Tree, caseClass: Symbol, pt: Type): Tree = { + private def convertToCaseConstructor(tree: Tree, caseClass: Symbol, ptIn: Type): Tree = { + // Unsoundness looms for those who infer type parameters with pt=Any. See SI-7886. + val pt = ( + if (ptIn =:= AnyTpe && caseClass.typeParams.nonEmpty) + devWarningResult(s"Evading kind-polymorphic expected type for case constructor of $caseClass")(caseClass.tpe_*) + else ptIn + ) val variantToSkolem = new VariantToSkolemMap val caseConstructorType = tree.tpe.prefix memberType caseClass memberType caseClass.primaryConstructor val tree1 = TypeTree(caseConstructorType) setOriginal tree |