From bb90c8457ab91e3c4cd707fa1a68e75e6dd96128 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 24 Jun 2015 15:29:04 +0200 Subject: setNewTyperState -> setExploreTyperState when computing shadoing implicits Nothing will be committed here, so setExplore... is the right method to pick. --- src/dotty/tools/dotc/typer/Typer.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/typer/Typer.scala') 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 -- cgit v1.2.3