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
audit:resolution: a bare None in == records Sema type Option while MIR lowers Option[&T] #2385
violation: resolution: main ... node kind 24: an expression lowered to an operand of another type (MIR Option[&i32], Sema Option) — the None literal's recorded Sema type is the bare generic Option base while MIR lowers the instantiated Option[&i32]. The D65 operand-type fact for a bare None under a comparison demand should be the demanded instantiation. Found while auditing the D117 fixtures; the same shape with List.first() reproduces it without any new code.
Triage 2026-10-25, with v0.15.3.0 (main a261b65): reproduced.
$ cat main.w
fn main:
var xs: List[i32] = []
print(f"{if xs.first() == None: "none" else: "some"}")
$ with analyze main.w audit:resolution
violation: resolution: main at main.w:3:31 node 15342: an expression lowered to an operand of another type (MIR Option[&i32], Sema Option, node kind 24)
resolution-audit: facts=19023 violations=1 FAILED
post-release: an audit false positive on valid code; the program itself runs.
Does not reproduce on main 6ea2ec2: with analyze repro.w audit:resolution over the issue's program reports violations=0 ok (the None beside xs.first() is lowered at the Option Sema recorded). The view cousin (#3057) is fixed with a fixture in the current batch.
Activity
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): reproduced.post-release: an audit false positive on valid code; the program itself runs.
ehartford commentedon Nov 11, 2026
Does not reproduce on main 6ea2ec2:
with analyze repro.w audit:resolutionover the issue's program reportsviolations=0 ok(the None besidexs.first()is lowered at the Option Sema recorded). The view cousin (#3057) is fixed with a fixture in the current batch.