Skip to content

Added regression test#5585

Merged
staabm merged 1 commit intophpstan:2.1.xfrom
staabm:regr
May 3, 2026
Merged

Added regression test#5585
staabm merged 1 commit intophpstan:2.1.xfrom
staabm:regr

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented May 3, 2026

@staabm staabm requested a review from VincentLanglet May 3, 2026 08:04
@staabm staabm merged commit 0fa020e into phpstan:2.1.x May 3, 2026
385 checks passed
@staabm staabm deleted the regr branch May 3, 2026 09:23
$this->checkUnionTypes = true;
$this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-9004.php'], [
[
'Cannot assign new offset to list<int>|string.',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On second reading, This error should not be reported thought

I feel like the issue might not be solved since we just trade an error for another @staabm.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

reading ondrejs comment, I got the impression it is a expected error

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I understand the opposite, since he say "it shouldn't report: "Cannot assign new offset to array<int, int>|string.""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll open a dedicated issue to run the bot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

reading it again - you are right

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants