1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Explode array-key into int|numeric-string after test

This commit is contained in:
Matthew Brown 2020-02-22 12:36:37 -05:00
parent ae1360a52f
commit 6adf6a09f0

View File

@ -1323,7 +1323,8 @@ class AssertionReconciler extends \Psalm\Type\Reconciler
$numeric_types[] = new TNumeric();
} elseif ($type instanceof TArrayKey) {
$did_remove_type = true;
$numeric_types[] = $type;
$numeric_types[] = new TInt();
$numeric_types[] = new TNumericString();
} elseif ($type instanceof TTemplateParam) {
$numeric_types[] = $type;
$did_remove_type = true;