From 18b30803952cee83580eab28068bc773fdce780e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 13 Jul 2016 15:17:17 +0200 Subject: Allow hk parameters in lower bounds --- src/dotty/tools/dotc/typer/Checking.scala | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/dotty/tools/dotc/typer/Checking.scala') diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala index b37216e6e..9e55216c1 100644 --- a/src/dotty/tools/dotc/typer/Checking.scala +++ b/src/dotty/tools/dotc/typer/Checking.scala @@ -534,17 +534,6 @@ trait Checking { errorTree(tpt, d"missing type parameter for ${tpt.tpe}") } else tpt - - def checkLowerNotHK(sym: Symbol, tparams: List[Symbol], pos: Position)(implicit ctx: Context) = - if (tparams.nonEmpty) - sym.info match { - case info: TypeAlias => // ok - case TypeBounds(lo, _) => - for (tparam <- tparams) - if (tparam.typeRef.occursIn(lo)) - ctx.error(i"type parameter ${tparam.name} may not occur in lower bound $lo", pos) - case _ => - } } trait NoChecking extends Checking { @@ -558,5 +547,4 @@ trait NoChecking extends Checking { override def checkNoDoubleDefs(cls: Symbol)(implicit ctx: Context): Unit = () override def checkParentCall(call: Tree, caller: ClassSymbol)(implicit ctx: Context) = () override def checkSimpleKinded(tpt: Tree)(implicit ctx: Context): Tree = tpt - override def checkLowerNotHK(sym: Symbol, tparams: List[Symbol], pos: Position)(implicit ctx: Context) = () } -- cgit v1.2.3