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/typer/Inferencing.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/typer/Inferencing.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Inferencing.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Inferencing.scala b/compiler/src/dotty/tools/dotc/typer/Inferencing.scala index 86649d78e..20efd4083 100644 --- a/compiler/src/dotty/tools/dotc/typer/Inferencing.scala +++ b/compiler/src/dotty/tools/dotc/typer/Inferencing.scala @@ -157,7 +157,7 @@ object Inferencing { case Apply(fn, _) => fn.tpe.widen match { case mtp: MethodType => - val (occ, nocc) = toTest.partition(tvar => mtp.paramTypes.exists(tvar.occursIn)) + val (occ, nocc) = toTest.partition(tvar => mtp.paramInfos.exists(tvar.occursIn)) occurring(fn, nocc, occ ::: acc) case _ => occurring(fn, toTest, acc) @@ -178,7 +178,7 @@ object Inferencing { */ private def instDirection(param: PolyParam)(implicit ctx: Context): Int = { val constrained = ctx.typerState.constraint.fullBounds(param) - val original = param.binder.paramBounds(param.paramNum) + val original = param.binder.paramInfos(param.paramNum) val cmp = ctx.typeComparer val approxBelow = if (!cmp.isSubTypeWhenFrozen(constrained.lo, original.lo)) 1 else 0 |