diff --git a/src/Type/Constant/ConstantArrayType.php b/src/Type/Constant/ConstantArrayType.php index 33149753c2..133d05c30a 100644 --- a/src/Type/Constant/ConstantArrayType.php +++ b/src/Type/Constant/ConstantArrayType.php @@ -963,7 +963,7 @@ public function generalize(GeneralizePrecision $precision): Type continue; } - $accessoryTypes[] = new HasOffsetValueType($keyType, $this->valueTypes[$i]); + $accessoryTypes[] = new HasOffsetValueType($keyType, $this->valueTypes[$i]->generalize($precision)); } return TypeCombinator::intersect($arrayType, ...$accessoryTypes);