Repository navigation
Self-host: nested ?? compileExpr + PHPTypes null> fragments (#2276) - #3727
Merged
Merged
Conversation
…ents (#2276) Bootstrap inventory lint reported Expr_BinaryOp_Coalesce across lib/ and ext/ spine files because embedded ?? (e.g. in casts) hit compileExpr without the block-level Coalesce path. Route Coalesce through compileCoalesce in compileExpr. Strip trailing generic fragments like "null>" from PHPTypes::fromDecl so list<Operand|null> PHPDoc on lib/JIT.php no longer fails type reconstruction. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
force-pushed
the
agent/issue-2276-coalesce-compile-expr
branch
from
May 30, 2026 11:06
583b982 to
a2cf916
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lane C picked #2276 after the open
implementation-readylanguage queue inissue % 3 == 2was entirely blocked (open PRs or stdlib-owned). Bootstrap inventory had regressed to 7 files reportingExpr_BinaryOp_Coalescepluslib/JIT.phpnull>PHPDoc fragments.lib/Compiler.php: handleOp\Expr\BinaryOp\CoalesceincompileExpr()viacompileCoalesce()so nested??(e.g.(int) ($stat['mode'] ?? 0)in spineext/standard/VmFs.php) lowers instead of hittingUnknown BinaryOp Type.patches/php-types-generic-null-tail.patch: strip straynull>tails fromPHPTypes::fromDecl()when unions insidelist<T|null>split incorrectly during docblock reconstruction (lib/JIT.php).php-src reference
Zend/zend_compile.c—zend_compile_coalesce()/ZEND_COALESCE(expression lowering)Zend/zend_operators.c—??runtime (VM already had block-level path; this wires nested expr path)Verification
Note:
CoalesceVmTest::testNullCoalesceThrowstill errors on master (pre-existing); not introduced here.Closes #2276
Made with Cursor