Skip to content
Permalink
Browse files

Fix unused ref in assign op

Fixes #1968
  • Loading branch information...
muglug committed Jul 24, 2019
1 parent ed61bca commit e22e0ac92c676bb48f54582c11c66d731a4bc581
@@ -847,6 +847,7 @@ public static function analyzeAssignmentRef(
if ($lhs_var_id) {
$context->vars_in_scope[$lhs_var_id] = Type::getMixed();
$context->hasVariable($lhs_var_id, $statements_analyzer);
}
if ($rhs_var_id) {
@@ -1002,6 +1002,13 @@ function foo(?A $a) : void {
}
}',
],
'varPassedByRef' => [
'<?php
function foo(array $b) : void {
$a = &$b;
$a["foo"] = 5;
}',
],
];
}

0 comments on commit e22e0ac

Please sign in to comment.
You can’t perform that action at this time.