Skip to content

Commit df50376

Browse files
committed
Better implementation for isFullyApplied.
1 parent f13865b commit df50376

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -646,12 +646,8 @@ class ExplicitJSClasses extends MiniPhase with InfoTransformer { thisPhase =>
646646
* In this phase, `transformApply`, `transformTypeApply` and `transformSelect`
647647
* must only operate on fully applied selections and applications.
648648
*/
649-
private def isFullyApplied(tree: Tree)(using Context): Boolean = {
650-
tree.tpe.widenTermRefExpr match {
651-
case _:PolyType | _:MethodType => false
652-
case _ => true
653-
}
654-
}
649+
private def isFullyApplied(tree: Tree)(using Context): Boolean =
650+
!tree.tpe.widenTermRefExpr.isInstanceOf[MethodOrPoly]
655651

656652
/** Wraps `super` calls to inner and local JS classes with
657653
* `withContextualJSClassValue`, to preserve a reified reference to the

0 commit comments

Comments
 (0)