Skip to content

Commit 29ab3ce

Browse files
committed
Workaround scala/scala3#1048
1 parent f9a9328 commit 29ab3ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scalariform/src/main/scala/scalariform/astselect/AstSelector.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ class AstSelector(source: String, scalaVersion: String = ScalaVersions.DEFAULT_V
181181

182182
private def isSelectableAst(nodeStack: List[AstNode]) =
183183
nodeStack match {
184-
case List(_: BlockExpr, _: MatchExpr, _*) false
185-
case List(_: BlockExpr, _: ProcFunBody, _*) false
186-
case List(node, _*) !(nonSelectableAstNodes contains node.getClass.asInstanceOf[Class[_ <: AstNode]])
187-
case Nil false
184+
case (_: BlockExpr) :: (_: MatchExpr) :: _ false
185+
case (_: BlockExpr) :: (_: ProcFunBody) :: _ false
186+
case node :: tail !(nonSelectableAstNodes contains node.getClass.asInstanceOf[Class[_ <: AstNode]])
187+
case Nil false
188188
}
189189

190190
}

0 commit comments

Comments
 (0)