aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Implicits.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-16 17:07:10 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-06 13:15:28 +0200
commit31ab8804d611343eb3cf35e2c1b929d5b65a946e (patch)
tree886cce4d249fdcca4de5d9b5e10c627d23c346b4 /compiler/src/dotty/tools/dotc/typer/Implicits.scala
parentc024a6037f3dd7e7458d936566cd4b653b8b7545 (diff)
downloaddotty-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/Implicits.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Implicits.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala
index 681045cc4..af2145376 100644
--- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala
@@ -66,16 +66,16 @@ object Implicits {
def discardForView(tpw: Type, argType: Type): Boolean = tpw match {
case mt: MethodType =>
mt.isImplicit ||
- mt.paramTypes.length != 1 ||
- !(argType relaxed_<:< mt.paramTypes.head)(ctx.fresh.setExploreTyperState)
+ mt.paramInfos.length != 1 ||
+ !(argType relaxed_<:< mt.paramInfos.head)(ctx.fresh.setExploreTyperState)
case poly: PolyType =>
// We do not need to call ProtoTypes#constrained on `poly` because
// `refMatches` is always called with mode TypevarsMissContext enabled.
poly.resultType match {
case mt: MethodType =>
mt.isImplicit ||
- mt.paramTypes.length != 1 ||
- !(argType relaxed_<:< wildApprox(mt.paramTypes.head, null, Set.empty)(ctx.fresh.setExploreTyperState))
+ mt.paramInfos.length != 1 ||
+ !(argType relaxed_<:< wildApprox(mt.paramInfos.head, null, Set.empty)(ctx.fresh.setExploreTyperState))
case rtp =>
discardForView(wildApprox(rtp, null, Set.empty), argType)
}