mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 22:01:48 +01:00
Use a slightly cleaner fix
This commit is contained in:
parent
11ee00442d
commit
7623e31829
@ -1549,11 +1549,15 @@ class SimpleAssertionReconciler extends \Psalm\Type\Reconciler
|
||||
$key_type->removeType($key);
|
||||
$key_type->addType(new Type\Atomic\TArrayKey());
|
||||
} elseif (!$cat instanceof TString && !$cat instanceof TInt) {
|
||||
// this should ideally prompt some sort of error
|
||||
$key_type->removeType($key);
|
||||
$key_type->addType(new Type\Atomic\TArrayKey());
|
||||
}
|
||||
}
|
||||
|
||||
if (!$key_type->getAtomicTypes()) {
|
||||
// this should ideally prompt some sort of error
|
||||
$key_type->addType(new Type\Atomic\TArrayKey());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user