mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Remove code that was breaking things
This commit is contained in:
parent
4cd7d923df
commit
13e14b3162
@ -195,12 +195,6 @@ class IfAnalyzer
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($if_context->vars_possibly_in_scope as $var_id => $_) {
|
||||
if (!isset($if_context->vars_in_scope[$var_id])) {
|
||||
$mixed_var_ids[] = $var_id;
|
||||
}
|
||||
}
|
||||
|
||||
$if_clauses = Algebra::getFormula(
|
||||
$stmt->cond,
|
||||
$context->self,
|
||||
|
@ -207,6 +207,26 @@ class ArrayAccessTest extends TestCase
|
||||
}
|
||||
}'
|
||||
],
|
||||
'arrayAccessPropertyAssertion' => [
|
||||
'<?php
|
||||
class A {}
|
||||
class B extends A {
|
||||
/** @var array<int, string> */
|
||||
public $arr = [];
|
||||
}
|
||||
|
||||
/** @var array<A> */
|
||||
$as = [];
|
||||
|
||||
if (!$as
|
||||
|| !$as[0] instanceof B
|
||||
|| !$as[0]->arr
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$b = $as[0]->arr;',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user