Skip to content

Commit f1758a6

Browse files
committed
Add a .widenExpr call
1 parent fd97de5 commit f1758a6

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
@@ -969,16 +969,11 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
969969
!tree.symbol.exists
970970
&& tree.isTerm
971971
&& hasRefinement(tree.qualifier.tpe)
972-
def loop(tree: Tree): Boolean = tree match
973-
case TypeApply(fun, _) =>
974-
loop(fun)
975-
case Apply(fun, _) =>
976-
loop(fun)
972+
funPart(tree) match
977973
case tree: Select =>
978974
isStructuralTermSelect(tree)
979975
case _ =>
980976
false
981-
loop(tree)
982977
}
983978

984979
/** 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)