File tree 2 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/typer
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -238,8 +238,8 @@ object Inferencing {
238
238
if (toTest.isEmpty) acc
239
239
else tree match {
240
240
case Apply (fn, _) =>
241
- fn.tpe.widen match {
242
- case mtp : MethodType =>
241
+ fn.tpe.widen.toLambda match {
242
+ case mtp : TermLambda =>
243
243
val (occ, nocc) = toTest.partition(tvar => mtp.paramInfos.exists(tvar.occursIn))
244
244
occurring(fn, nocc, occ ::: acc)
245
245
case _ =>
Original file line number Diff line number Diff line change @@ -1849,8 +1849,8 @@ class Typer extends Namer
1849
1849
/** Interpolate and simplify the type of the given tree. */
1850
1850
protected def simplify (tree : Tree , pt : Type , locked : TypeVars )(implicit ctx : Context ): tree.type = {
1851
1851
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
1854
1854
{
1855
1855
interpolateTypeVars(tree, pt, locked)
1856
1856
tree.overwriteType(tree.tpe.simplified)
You can’t perform that action at this time.
0 commit comments