File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -960,9 +960,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
960
960
&& tree.isTerm
961
961
&& {
962
962
val qualType = tree.qualifier.tpe
963
- hasRefinement(qualType) &&
964
- ! qualType.derivesFrom(defn.PolyFunctionClass ) &&
965
- ! defn.isErasedFunctionType(qualType)
963
+ hasRefinement(qualType) && ! defn.isRefinedFunctionType(qualType)
966
964
}
967
965
def loop (tree : Tree ): Boolean = tree match
968
966
case TypeApply (fun, _) =>
Original file line number Diff line number Diff line change @@ -1681,7 +1681,7 @@ class Definitions {
1681
1681
1682
1682
/** Is `tp` a specialized, refined function type? Either an `ErasedFunction` or a `PolyFunction`. */
1683
1683
def isRefinedFunctionType (tp : Type )(using Context ): Boolean =
1684
- ( tp.typeSymbol eq defn.PolyFunctionClass ) || isErasedFunctionType(tp)
1684
+ tp.derivesFrom( defn.PolyFunctionClass ) || isErasedFunctionType(tp)
1685
1685
1686
1686
def isFunctionOrPolyType (tp : Type )(using Context ): Boolean =
1687
1687
isFunctionType(tp) || isRefinedFunctionType(tp)
You can’t perform that action at this time.
0 commit comments