diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-16 17:07:10 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-06 13:15:28 +0200 |
commit | 31ab8804d611343eb3cf35e2c1b929d5b65a946e (patch) | |
tree | 886cce4d249fdcca4de5d9b5e10c627d23c346b4 /compiler/src/dotty/tools/dotc/transform/FullParameterization.scala | |
parent | c024a6037f3dd7e7458d936566cd4b653b8b7545 (diff) | |
download | dotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.tar.gz dotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.tar.bz2 dotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.zip |
Harmonize paramTypes and paramBounds
MethodTypes have paramTypes whereas PolyTypes have paramBounds.
We now harmonize by alling both paramInfos, and parameterizing
types that will become common to both.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform/FullParameterization.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/transform/FullParameterization.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala index 7fb9ba302..dd318861a 100644 --- a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala +++ b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala @@ -124,7 +124,7 @@ trait FullParameterization { case info: PolyType => PolyType(info.paramNames ++ ctnames)( pt => - (info.paramBounds.map(mapClassParams(_, pt).bounds) ++ + (info.paramInfos.map(mapClassParams(_, pt).bounds) ++ mappedClassBounds(pt)).mapConserve(_.subst(info, pt).bounds), pt => resultType(mapClassParams(_, pt)).subst(info, pt)) case _ => @@ -233,7 +233,7 @@ trait FullParameterization { fun.appliedToArgss(originalDef.vparamss.nestedMap(vparam => ref(vparam.symbol))) else { // this type could have changed on forwarding. Need to insert a cast. - val args = (originalDef.vparamss, fun.tpe.paramTypess).zipped.map((vparams, paramTypes) => + val args = (originalDef.vparamss, fun.tpe.paramInfoss).zipped.map((vparams, paramTypes) => (vparams, paramTypes).zipped.map((vparam, paramType) => { assert(vparam.tpe <:< paramType.widen) // type should still conform to widened type ref(vparam.symbol).ensureConforms(paramType) |