We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00a4998 commit 1824ad8Copy full SHA for 1824ad8
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -3520,7 +3520,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
3520
def methodStr = err.refStr(methPart(tree).tpe)
3521
3522
def readapt(tree: Tree)(using Context) = adapt(tree, pt, locked)
3523
- def readaptSimplified(tree: Tree)(using Context) = readapt(simplify(tree, pt, locked))
+ def readaptSimplified(tree: Tree)(using Context) = readapt(
3524
+ // also locking precise type variables to prevent their widening to bounds in implicits
3525
+ simplify(tree, pt, locked ++ ctx.typerState.ownedVars.filter(_.isPrecise))
3526
+ )
3527
3528
def missingArgs(mt: MethodType) =
3529
ErrorReporting.missingArgs(tree, mt)
0 commit comments