You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc12558
Browse filesBrowse the repository at this point in the historyBrowse files
Keep the lazy reasons of a maybe callable parameter comparison
CallableTypeHelper::isParametersAcceptorSuperTypeOf() rebuilds a maybe
parameter result to append its "needs to be same or wider" reason, and
passed on only the eager reasons. A maybe result can carry lazy reasons
- a union parameter type's or() keeps those of its no members, like
ConstantArrayType's reason for sealed shapes that cannot be intersected
- so a reason that would have been listed had it been built eagerly was
lost from getReasons(). The rebuilt result now keeps them; the native
port does the same. (The accepts() path converts AcceptsResults, which
have no lazy reasons, so nothing is lost there.)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Fdg8n3eEi4ZoXa4dA2k4A
$this->assertSame('Type array{a: int}|array{b: int} of parameter #1 $x of passed callable needs to be same or wider than parameter type array{a: int, b?: int} of accepting callable.', $reasons[0]);
445
+
$this->assertStringStartsWith('Sealed array shapes array{b: int} and array{a: int, b?: int} cannot be intersected.', $reasons[1]);
0 commit comments