Skip to content

Commit

Permalink
Add a .widenExpr call
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Sep 8, 2023
1 parent fd97de5 commit f1758a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -969,16 +969,11 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
!tree.symbol.exists
&& tree.isTerm
&& hasRefinement(tree.qualifier.tpe)
def loop(tree: Tree): Boolean = tree match
case TypeApply(fun, _) =>
loop(fun)
case Apply(fun, _) =>
loop(fun)
funPart(tree) match
case tree: Select =>
isStructuralTermSelect(tree)
case _ =>
false
loop(tree)
}

/** Return a pair consisting of (supercall, rest)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Dynamic.scala
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ trait Dynamic {

fun.tpe.widen match {
case tpe: ValueType =>
structuralCall(nme.selectDynamic, Nil).maybeBoxingCast(fun.tpe)
structuralCall(nme.selectDynamic, Nil).maybeBoxingCast(fun.tpe.widenExpr)

case tpe: MethodType =>
def isDependentMethod(tpe: Type): Boolean = tpe match {
Expand Down

0 comments on commit f1758a6

Please sign in to comment.