Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Add test
  • Loading branch information
VincentLanglet authored and staabm committed Mar 31, 2026
commit 9f51d3929e576bfe001c8dd5519e6a09e60f8820
3 changes: 3 additions & 0 deletions tests/PHPStan/Analyser/nsrt/bug-6934.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@

function removeFromParent(?DOMNode $node): void {
$node?->parentNode?->removeChild($node);
Comment thread
staabm marked this conversation as resolved.
Resolved
$node?->removeChild($node);

assertType('DOMNode|null', $node);
assertType('DOMNode|null', $node?->parentNode);
}

function testNarrowing(?DOMNode $node): void {
$node?->parentNode?->removeChild(assertType('DOMNode', $node));
$node?->removeChild(assertType('DOMNode', $node));
}

class Foo {
Expand Down
Loading