Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Analyser/MutatingScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -4238,7 +4238,7 @@ public function specifyExpressionType(Expr $expr, Type $type, Type $nativeType,
new ObjectType(ArrayAccess::class),
new NullType(),
];
if ($dimType instanceof ConstantIntegerType) {
if ($dimType->isInteger()->yes()) {
Copy link
Contributor Author

@staabm staabm Jul 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$dimType instance ConstantIntegerType is already narrowed in the outer if

$types[] = new StringType();
}

Expand Down
Loading