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 bare variant shorthand is not accepted under an Option demand in an assignment or an if-expression branch #3062
§9.5 / D22: an Option[E] demand types a bare variant shorthand as Some(.V) (the census pattern some-at-option-demand counts the written Some(x) as ceremony). Two sites still require the Some:
enum Kind:
A
B
var k: Option[Kind] = None
k = .A # error: type mismatch in assignment
k = if cond: .A else: .B # error: if expressions do not establish one compatible owned result type
Both are accepted written k = Some(.A) / k = Some(if cond: .A else: .B). Expected: the variable's type is the demand for the assigned expression and for both branches of the if.
Found 2026-11-07 in src/SemaFacade.w (the D194 stack converts FACADE_VARIADIC_* to an enum and classifies a case into an Option[FacadeVariadicKind]); the three Some(...) there are granted in build/ceremony-allowances.tsv against this issue and come out when it lands.
Fixed on main by the time of 961cd90: the issue's two spellings check clean with the installed compiler at that commit.
enum Kind:
A
B
fn main:
var k: Option[Kind] = None
k = .A
k = if k.is_some(): .A else: .B
print(f"{k.is_some()}")
with check exits 0 with no diagnostics. The three Some(...) in src/SemaFacade.w granted against this issue come out in the with fix-ceremony sweep (#3061), whose Some-under-Option pass removes them.
Activity
D194 (#3010): retained pointer cases of a variadic contract; census p…
ehartford commentedon Nov 8, 2026
Fixed on main by the time of 961cd90: the issue's two spellings check clean with the installed compiler at that commit.
with checkexits 0 with no diagnostics. The threeSome(...)insrc/SemaFacade.wgranted against this issue come out in thewith fix-ceremonysweep (#3061), whoseSome-under-Option pass removes them.fix-ceremony: facts proven on the compiler, --check-with, and the src…