Skip to content

Commit e69e0d6

Browse files
committed
drop unused code
1 parent 89e0f2a commit e69e0d6

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,8 @@ class ExpandSAMs extends MiniPhase:
105105
* ```
106106
*/
107107
private def toPartialFunction(tree: Block, tpe: Type)(using Context): Tree = {
108-
/** An extractor for match, either contained in a block or standalone. */
109-
object PartialFunctionRHS {
110-
def unapply(tree: Tree): Option[Match] = tree match {
111-
case Block(Nil, expr) => unapply(expr)
112-
case m: Match => Some(m)
113-
case _ => None
114-
}
115-
}
116-
117108
val closureDef(anon @ DefDef(_, List(List(param)), _, _)) = tree
118-
109+
119110
// The right hand side from which to construct the partial function. This is always a Match.
120111
// If the original rhs is already a Match (possibly in braces), return that.
121112
// Otherwise construct a match `x match case _ => rhs` where `x` is the parameter of the closure.

0 commit comments

Comments
 (0)