We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06925a8 commit 1189a06Copy full SHA for 1189a06
1 file changed
tests/PHPStan/Analyser/nsrt/bug-11234.php
@@ -65,3 +65,15 @@ function testIntersectNonEmptyStringValue(mixed $x): void
65
{
66
assertType('array{non-empty-string, Bug11234\Payload}', $x);
67
}
68
+
69
+/** @param array{0|1|2|3, non-empty-string|int|null}&array{int, string} $x */
70
+function testIntersectNonEmptyStringInUnion(mixed $x): void
71
+{
72
+ assertType('array{0|1|2|3, non-empty-string}', $x);
73
+}
74
75
+/** @param array{0|1|2|3, string|null}&array{int, non-empty-string} $x */
76
+function testIntersectWithNonEmptyStringOtherSide(mixed $x): void
77
78
79
0 commit comments