Skip to content
Snippets Groups Projects
Commit 8ac05b91 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Make sure we target Array.update only with ExUpdate

parent e47a1a65
No related branches found
No related tags found
No related merge requests found
...@@ -703,8 +703,9 @@ trait ASTExtractors { ...@@ -703,8 +703,9 @@ trait ASTExtractors {
object ExUpdate { object ExUpdate {
def unapply(tree: Apply): Option[(Tree, Tree, Tree)] = tree match { def unapply(tree: Apply): Option[(Tree, Tree, Tree)] = tree match {
case Apply( case Apply(
Select(lhs, update), s @ Select(lhs, update),
index :: newValue :: Nil) if(update.toString == "update") => Some((lhs, index, newValue)) index :: newValue :: Nil) if(s.symbol.fullName.endsWith("Array.update")) =>
Some((lhs, index, newValue))
case _ => None case _ => None
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment