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 6ce1ac7 commit b22f22aCopy full SHA for b22f22a
compiler/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -345,7 +345,13 @@ trait Inferencing { this: Typer =>
345
def ensureConstrained() =
346
if (!isConstrained) {
347
isConstrained = true
348
- constrainResult(tree.tpe, pt)
+ tree match {
349
+ case tree: Apply => // already constrained
350
+ case _ => tree.tpe match {
351
+ case _: MethodOrPoly => // already constrained
352
+ case tp => constrainResult(tp, pt)
353
+ }
354
355
}
356
357
// Avoid interpolating variables if typerstate has unreported errors.
0 commit comments