mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Use a slightly cleaner fix
This commit is contained in:
parent
9878613594
commit
f33d626052
@ -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…
Reference in New Issue
Block a user