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
A temporary returned through a T|false method return and used in a call chain is not destructed at the end of the statement. #334
A temporary returned through a T|false method return and used in a call chain is not destructed at the end of the statement.
Repro
<?phpclass S { function__destruct() { echo"dtor\n"; } functionv(): int { return1; } }
class D { functionmk(): S|false { $s = newS(); return$s; } }
$d = newD();
$x = $d->mk()->v();
echo"after\n";
Expected (php)
dtor
after
Actual (manticore 5b9a32ad, Darwin arm64)
after
dtor
Tracking
Known-bug repro: tests/aot/repro/wrong/union_return_temp_dtor.php — bash tests/aot/xfail.sh -k union_return_temp_dtor reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Activity