aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-06-24 15:29:04 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-24 17:18:54 +0200
commitbb90c8457ab91e3c4cd707fa1a68e75e6dd96128 (patch)
tree87dfc63242533316d48a0658a50a769d8034e986 /src/dotty/tools/dotc/typer/Typer.scala
parent5395414a68bdcf682bbfc8de5d1c47e86fce708a (diff)
downloaddotty-bb90c8457ab91e3c4cd707fa1a68e75e6dd96128.tar.gz
dotty-bb90c8457ab91e3c4cd707fa1a68e75e6dd96128.tar.bz2
dotty-bb90c8457ab91e3c4cd707fa1a68e75e6dd96128.zip
setNewTyperState -> setExploreTyperState when computing shadoing implicits
Nothing will be committed here, so setExplore... is the right method to pick.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index a8e28b8c2..af6adb6a6 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -1283,6 +1283,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
case wtp: ExprType =>
adaptInterpolated(tree.withType(wtp.resultType), pt, original)
case wtp: ImplicitMethodType if constrainResult(wtp, pt) =>
+ val constr = ctx.typerState.constraint
def addImplicitArgs = {
def implicitArgError(msg: => String): Tree = {
ctx.error(msg, tree.pos.endPos)
@@ -1299,7 +1300,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
implicitArgError(d"no implicit argument of type $formal found for $where" + failure.postscript)
}
}
- if (args.exists(_.isEmpty)) tree
+ if (args.exists(_.isEmpty)) { assert(constr eq ctx.typerState.constraint); tree }
else adapt(tpd.Apply(tree, args), pt)
}
if ((pt eq WildcardType) || original.isEmpty) addImplicitArgs