diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-14 16:47:55 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-06 13:15:27 +0200 |
commit | 6545606cefaf8ec7090f8a601123bfae61b441a6 (patch) | |
tree | 8d8f261fb6c9807923ea60f4611b8c2b6e4f3ddf /compiler/src/dotty/tools/dotc/typer | |
parent | 62c2a1e2d6265cf7f096e4c4e51e4e883bce1514 (diff) | |
download | dotty-6545606cefaf8ec7090f8a601123bfae61b441a6.tar.gz dotty-6545606cefaf8ec7090f8a601123bfae61b441a6.tar.bz2 dotty-6545606cefaf8ec7090f8a601123bfae61b441a6.zip |
Encode variances in parameter names
This leads to a slight overall simplification, harmonizes pickle
format with internal representation, and makes MethodTypes and
PolyTypes more similar to each other.
I believe the change is useful as it is, but in particular it is
a useful step for an eventual unification of MethodTypes and
PolyTypes.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala index f96b8ae1d..d61e24261 100644 --- a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala +++ b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala @@ -401,7 +401,7 @@ object ProtoTypes { /** Create a new polyparam that represents a dependent method parameter singleton */ def newDepPolyParam(tp: Type)(implicit ctx: Context): PolyParam = { - val poly = PolyType(ctx.freshName(nme.DEP_PARAM_PREFIX).toTypeName :: Nil, 0 :: Nil)( + val poly = PolyType(ctx.freshName(nme.DEP_PARAM_PREFIX).toTypeName :: Nil)( pt => TypeBounds.upper(AndType(tp, defn.SingletonType)) :: Nil, pt => defn.AnyType) ctx.typeComparer.addToConstraint(poly, Nil) |