mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Remove bad variable check
This commit is contained in:
parent
4ee0298558
commit
9099a0972b
@ -275,8 +275,7 @@ class TryChecker
|
|||||||
|
|
||||||
if ($catch_actions[$i] !== [ScopeChecker::ACTION_END]) {
|
if ($catch_actions[$i] !== [ScopeChecker::ACTION_END]) {
|
||||||
foreach ($catch_context->vars_in_scope as $var_id => $type) {
|
foreach ($catch_context->vars_in_scope as $var_id => $type) {
|
||||||
if ((!is_string($catch->var->name) || ('$' . $catch->var->name) !== $var_id)
|
if ($context->hasVariable($var_id)
|
||||||
&& $context->hasVariable($var_id)
|
|
||||||
&& $context->vars_in_scope[$var_id]->getId() !== $type->getId()
|
&& $context->vars_in_scope[$var_id]->getId() !== $type->getId()
|
||||||
) {
|
) {
|
||||||
$context->vars_in_scope[$var_id] = Type::combineUnionTypes(
|
$context->vars_in_scope[$var_id] = Type::combineUnionTypes(
|
||||||
|
Loading…
Reference in New Issue
Block a user