Skip to content

Commit 5e6bfa2

Browse files
committed
Polish pattern match
1 parent 5b2d7bf commit 5e6bfa2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -2047,10 +2047,9 @@ trait Applications extends Compatibility {
20472047
else WildcardType)
20482048
/** Should we generate a partial function for the arg ? */
20492049
def isPartial = untpd.functionWithUnknownParamType(arg) match
2050-
case Some(fn) =>
2051-
fn.isInstanceOf[untpd.Match] &&
2050+
case Some(_: untpd.Match) =>
20522051
formalsForArg.exists(_.isRef(defn.PartialFunctionClass))
2053-
case None =>
2052+
case _ =>
20542053
false
20552054
val commonFormal =
20562055
if (isPartial) defn.PartialFunctionOf(commonParamTypes.head, WildcardType)

0 commit comments

Comments
 (0)