File tree Expand file tree Collapse file tree 2 files changed +2
-15
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -2224,11 +2224,9 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
2224
2224
if (isFullyDefined(wtp, force = ForceDegree .all) &&
2225
2225
ctx.typerState.constraint.ne(prevConstraint)) adapt(tree, pt)
2226
2226
else err.typeMismatch(tree, pt, failure)
2227
- if (ctx.mode.is(Mode .ImplicitsEnabled )) {
2228
- val nestedCtx = ctx.fresh.setNewTyperState()
2229
- inferView(tree, pt)(nestedCtx) match {
2227
+ if (ctx.mode.is(Mode .ImplicitsEnabled ))
2228
+ inferView(tree, pt) match {
2230
2229
case SearchSuccess (inferred, _, _, _) =>
2231
- nestedCtx.typerState.commit()
2232
2230
adapt(inferred, pt)(ctx.retractMode(Mode .ImplicitsEnabled ))
2233
2231
case failure : SearchFailure =>
2234
2232
if (pt.isInstanceOf [ProtoType ] && ! failure.isInstanceOf [AmbiguousImplicits ])
@@ -2238,7 +2236,6 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
2238
2236
tree
2239
2237
else recover(failure)
2240
2238
}
2241
- }
2242
2239
else recover(NoImplicitMatches )
2243
2240
}
2244
2241
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments