diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php --- a/src/lint/linter/ArcanistXHPASTLinter.php +++ b/src/lint/linter/ArcanistXHPASTLinter.php @@ -3107,7 +3107,7 @@ $nodes = $root->selectDescendantsOfType('n_CALL_PARAMETER_LIST'); foreach ($nodes as $node) { - $parameters = $node->selectDescendantsOfType('n_VARIABLE_REFERENCE'); + $parameters = $node->getChildrenOfType('n_VARIABLE_REFERENCE'); foreach ($parameters as $parameter) { $this->raiseLintAtNode( diff --git a/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test b/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test --- a/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test +++ b/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test @@ -20,6 +20,9 @@ sprintf('0%o', 0777 & $p); $foo(&$myvar); + +array_walk(array(), function() use (&$x) {}); +MyClass::myfunc(array(&$x, &$y)); ~~~~~~~~~~ error:2:7 XHP19 error:9:8