File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -238,8 +238,8 @@ object Inferencing {
238238 if (toTest.isEmpty) acc
239239 else tree match {
240240 case Apply (fn, _) =>
241- fn.tpe.widen match {
242- case mtp : MethodType =>
241+ fn.tpe.widen.toLambda match {
242+ case mtp : TermLambda =>
243243 val (occ, nocc) = toTest.partition(tvar => mtp.paramInfos.exists(tvar.occursIn))
244244 occurring(fn, nocc, occ ::: acc)
245245 case _ =>
Original file line number Diff line number Diff line change @@ -1849,8 +1849,8 @@ class Typer extends Namer
18491849 /** Interpolate and simplify the type of the given tree. */
18501850 protected def simplify (tree : Tree , pt : Type , locked : TypeVars )(implicit ctx : Context ): tree.type = {
18511851 if (! tree.denot.isOverloaded) // for overloaded trees: resolve overloading before simplifying
1852- if (! tree.tpe.widen.isInstanceOf [MethodOrPoly ] // wait with simplifying until method is fully applied
1853- || tree.isDef) // ... unless tree is a definition
1852+ if (! tree.tpe.widen.toLambda. isInstanceOf [LambdaType ] // wait with simplifying until lambda is fully applied
1853+ || tree.isDef) // ... unless tree is a definition
18541854 {
18551855 interpolateTypeVars(tree, pt, locked)
18561856 tree.overwriteType(tree.tpe.simplified)
You can’t perform that action at this time.
0 commit comments