diff options
author | Martin Odersky <odersky@gmail.com> | 2015-12-01 12:32:59 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-12-06 16:09:19 +0100 |
commit | df00eb195d86a3d1425029f2f2436029a757ee5d (patch) | |
tree | 8ecba17ee7babf69f3dbe18f960c21abb95a412d /src | |
parent | 4c8db87e499e3a0f56a89ed0824b27230db32997 (diff) | |
download | dotty-df00eb195d86a3d1425029f2f2436029a757ee5d.tar.gz dotty-df00eb195d86a3d1425029f2f2436029a757ee5d.tar.bz2 dotty-df00eb195d86a3d1425029f2f2436029a757ee5d.zip |
Disallow existentially bound parameters as type parameters
Done in order to keep the basics as simple as possible.
Treating existentially bound parameters as still instantiatable type
parameters does not seem to add anything fundamental, and makes the
type system less regular.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeApplications.scala | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index 1c1717649..c2738f4be 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -69,18 +69,7 @@ class TypeApplications(val self: Type) extends AnyVal { if (lam.exists) lam.typeParams else Nil } case self: RefinedType => - def isBoundedLambda(tp: Type): Boolean = tp match { - case tp: TypeRef => tp.typeSymbol.isLambdaTrait - case tp: RefinedType => tp.refinedName.isLambdaArgName && isBoundedLambda(tp.parent) - case _ => false - } - val tparams = self.parent.typeParams - self.refinedInfo match { - case rinfo: TypeBounds if rinfo.isAlias || isBoundedLambda(self) => - tparams.filterNot(_.name == self.refinedName) - case _ => - tparams - } + self.parent.typeParams.filterNot(_.name == self.refinedName) case self: SingletonType => Nil case self: TypeProxy => |