Skip to content

Commit af50551

Browse files
dwijnandWojciechMazur
authored andcommitted
Add a .widenExpr call
[Cherry-picked f1758a6]
1 parent 4e0bf6c commit af50551

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -962,16 +962,11 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
962962
!tree.symbol.exists
963963
&& tree.isTerm
964964
&& hasRefinement(tree.qualifier.tpe)
965-
def loop(tree: Tree): Boolean = tree match
966-
case TypeApply(fun, _) =>
967-
loop(fun)
968-
case Apply(fun, _) =>
969-
loop(fun)
965+
funPart(tree) match
970966
case tree: Select =>
971967
isStructuralTermSelect(tree)
972968
case _ =>
973969
false
974-
loop(tree)
975970
}
976971

977972
/** Return a pair consisting of (supercall, rest)

compiler/src/dotty/tools/dotc/typer/Dynamic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ trait Dynamic {
242242

243243
fun.tpe.widen match {
244244
case tpe: ValueType =>
245-
structuralCall(nme.selectDynamic, Nil).maybeBoxingCast(fun.tpe)
245+
structuralCall(nme.selectDynamic, Nil).maybeBoxingCast(fun.tpe.widenExpr)
246246

247247
case tpe: MethodType =>
248248
def isDependentMethod(tpe: Type): Boolean = tpe match {

0 commit comments

Comments
 (0)