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
Upstream candidate: if not t.x then return end does not narrow t.x on main (fork and 0.25.1 do) #42
Only the negated member test followed by an early exit fails. A positive test, == nil, and the same test on a local all narrow.
Correction to my #14 comment of 2026-11-17: I described this there as "a member guard doesn't hold when the receiver is a local narrowed from Norm?". The receiver's narrowing doesn't matter: a plain ---@param n Norm fails the same way.
Next
Find the fork commit that avoids it (gndx emmylua fork topics touching member narrowing; upstream draft 1361 is about the owner on a member test, so probably not that one).
Upstream main now narrows if not n.target then return end, and the control still reports, so the check is live. Nothing to port. I suggest closing this as fixed upstream once the next gndx emmylua sync merges fcc0416 (at that merge, check that the fork's narrowing and upstream's new flow.rs don't conflict).
Merged upstream fcc0416 into the fork as 8581c78 (local, not pushed yet). The fork keeps its own flow.rs, which already narrowed this case. Upstream's new tests for the same area (test_not_member_true_branch_narrows_to_nil and the rest of fcc0416's need_check_nil tests) pass on the merge, after porting fcc0416's falsy branch for if not t.x then. Nothing is left to port upstream for this issue.
Upstream fixed it somewhere between 2c400ee and 70dbcf4, and the fork has merged that range (7d6084b). There's nothing to port, so I didn't look for the fork commit that avoided it. The flow.md placement is updated in 4912ed4.
Activity
Runtime writes count only around the read; a negated member test narrows
mareklangiewicz commentedon Nov 17, 2026
Fixed upstream by fcc0416 "fix(flow): narrow members" (xuhuanzy, 2026-11-18)
I re-ran the repro above as written, plus a control
take(n.target)with no guard (line 50), usinggndx emmylua probewith.emmyrc.json={}:Upstream main now narrows
if not n.target then return end, and the control still reports, so the check is live. Nothing to port. I suggest closing this as fixed upstream once the nextgndx emmylua syncmerges fcc0416 (at that merge, check that the fork's narrowing and upstream's newflow.rsdon't conflict).mareklangiewicz commentedon Nov 18, 2026
Merged upstream fcc0416 into the fork as 8581c78 (local, not pushed yet). The fork keeps its own flow.rs, which already narrowed this case. Upstream's new tests for the same area (
test_not_member_true_branch_narrows_to_niland the rest of fcc0416's need_check_nil tests) pass on the merge, after porting fcc0416's falsy branch forif not t.x then. Nothing is left to port upstream for this issue.mareklangiewicz commentedon Nov 20, 2026
Gone upstream; closing. I re-ran the repro above as written (
gndx emmylua probe, empty config) on 2026-11-20:param-type-mismatchlines 12, 27Upstream fixed it somewhere between 2c400ee and 70dbcf4, and the fork has merged that range (7d6084b). There's nothing to port, so I didn't look for the fork commit that avoided it. The
flow.mdplacement is updated in 4912ed4.flow.md: #43 ranking status at c60fdcd / upstream 70dbcf4; #42 gone u…