File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -1265,16 +1265,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
1265
1265
1266
1266
def adapt (tree : Tree , pt : Type , original : untpd.Tree = untpd.EmptyTree )(implicit ctx : Context ) = /* >|>*/ track(" adapt" ) /* <|<*/ {
1267
1267
/* >|>*/ ctx.traceIndented(i " adapting $tree of type ${tree.tpe} to $pt" , typr, show = true ) /* <|<*/ {
1268
- val isMethodCall =
1269
- tree.tpe.widen match {
1270
- case (_ : MethodType ) | (_ : PolyType ) if ! tree.isDef =>
1271
- true
1272
- case _ =>
1273
- false
1274
- }
1275
- if (! isMethodCall) // Delay tvar interpolation in method calls until they're fully applied
1276
- interpolateUndetVars(tree, if (tree.isDef) tree.symbol else NoSymbol )
1277
-
1268
+ if (tree.isDef) interpolateUndetVars(tree, tree.symbol)
1269
+ else if (! tree.tpe.isInstanceOf [MethodOrPoly ]) interpolateUndetVars(tree, NoSymbol )
1278
1270
tree.overwriteType(tree.tpe.simplified)
1279
1271
adaptInterpolated(tree, pt, original)
1280
1272
}
You can’t perform that action at this time.
0 commit comments