diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-10-25 15:54:12 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-10-25 15:54:12 +0100 |
commit | 08df804a5b4b7289a1518aa5ccf9753ec1a8cd7a (patch) | |
tree | 94cc2597ae3763ed8d540646209864f0b67d9612 /src/dotty/tools/dotc/typer | |
parent | ecf62cf18b43b5a39e973bdc8087675a24337ce0 (diff) | |
parent | 875d7da572b2367222e3021edcecb2d3cb33cefa (diff) | |
download | dotty-08df804a5b4b7289a1518aa5ccf9753ec1a8cd7a.tar.gz dotty-08df804a5b4b7289a1518aa5ccf9753ec1a8cd7a.tar.bz2 dotty-08df804a5b4b7289a1518aa5ccf9753ec1a8cd7a.zip |
Merge pull request #863 from dotty-staging/fix/inference-methcall
Fix/inference methcall
Diffstat (limited to 'src/dotty/tools/dotc/typer')
-rw-r--r-- | src/dotty/tools/dotc/typer/Inferencing.scala | 2 | ||||
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala index f414d3bce..ac4ad1b35 100644 --- a/src/dotty/tools/dotc/typer/Inferencing.scala +++ b/src/dotty/tools/dotc/typer/Inferencing.scala @@ -141,7 +141,7 @@ object Inferencing { if (toTest.isEmpty) acc else tree match { case Apply(fn, _) => - fn.tpe match { + fn.tpe.widen match { case mtp: MethodType => val (occ, nocc) = toTest.partition(tvar => mtp.paramTypes.exists(tvar.occursIn)) occurring(fn, nocc, occ ::: acc) diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 6510ba35b..52ea32bbc 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -563,7 +563,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val pos = params indexWhere (_.name == param.name) if (pos < mtpe.paramTypes.length) { val ptype = mtpe.paramTypes(pos) - if (isFullyDefined(ptype, ForceDegree.none)) return ptype + if (isFullyDefined(ptype, ForceDegree.noBottom)) return ptype } case _ => } @@ -1265,7 +1265,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit def adapt(tree: Tree, pt: Type, original: untpd.Tree = untpd.EmptyTree)(implicit ctx: Context) = /*>|>*/ track("adapt") /*<|<*/ { /*>|>*/ ctx.traceIndented(i"adapting $tree of type ${tree.tpe} to $pt", typr, show = true) /*<|<*/ { - interpolateUndetVars(tree, if (tree.isDef) tree.symbol else NoSymbol) + if (tree.isDef) interpolateUndetVars(tree, tree.symbol) + else if (!tree.tpe.widen.isInstanceOf[MethodOrPoly]) interpolateUndetVars(tree, NoSymbol) tree.overwriteType(tree.tpe.simplified) adaptInterpolated(tree, pt, original) } |