1
0
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:
Matthew Brown 2018-12-19 00:28:11 -05:00
parent 4cd7d923df
commit 13e14b3162
2 changed files with 20 additions and 6 deletions

View File

@ -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,

View File

@ -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;',
],
];
}