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
The C4 final test survey at 6d54088 rejects test/behavior/behav_d27_view_nll_before_owner_consume.w after the last use of an element view. Expected: D27 / §8.4 NLL allows consuming and replacing the owner after the view's last use. Actual: view 'view' may outlive its origin 'owner' at EOF. The previous compiler (90d4858, before the regex lifetime update) accepts the same test.
Exact LLDB proof: in Sema.check_fn_body_with_sig_at, borrow_refs, borrow_scope_depths, and borrow_creation_nodes each have length 1 before function setup. At function+880, after the clear loop in SemaCheck.w:2067–2073, their lengths are 0, 1, 1. The loop pops six columns and omits the two newer metadata columns. The closure rollback at SemaCheck.w:14010–14016 duplicates the same incomplete operation.
The later element borrow reads stale depth 2 while current scope depth is 3. LLDB at Sema.expire_dead_borrows_in_block +188 observed w8=2, w24=3, then the +196 branch falls through to the skip at +200. The effect trace correctly reports identity's consuming escape_value parameter; this is corrupted borrow metadata, not a signature ruling.
Fix in progress: use existing remove_borrow_at for whole-row removal in both cleanup paths, and validate column lengths before expiration/removal so inconsistent metadata fails as an internal compiler error. No diagnostic is relaxed. Local proof logs: out/c4-validation/nll-partial-clear-lldb-confirmed.log and nll-depth-skip-lldb.log. No workaround used.
Activity
fix(sema): remove complete borrow rows during scope cleanup