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
D126/D127 (§4.3c, §3.1): a slice demand does not type a literal or a constant in argument position — sum([1, 2, 3]) and first(NAMES) are "wrong argument type" #2944
Conformance audit 2026-11-02. Spec v7.32 (D126, D127; README changelog says "the implementation is NON-COMPLIANT until it catches up") — §4.3c: "A slice demand supplies the element type to a literal in argument position and views it; it demands no collection." §3.1: a view of a constant is a view of an immutable static.
(The by-use form let ys = [4, 5]; total(ys) with total(xs: List[i32]) passes, so D93 is in; the slice demand is what is missing.) Done when both compile and run, with behavior fixtures.
Closed by #2992: the example was wrong, not the compiler (#2987's rule). &[i32] is a reference to a slice (&[]i32); the slice is []i32, and with it sum([1, 2, 3]), sum(ys) and first(NAMES) compile and run. The argument-mismatch diagnostic now says so when a parameter is &[]T.
Activity
D126 (#2944): the slice demand's fixture spells the slice `[]T`; `&[]…
ehartford commentedon Nov 2, 2026
Closed by #2992: the example was wrong, not the compiler (#2987's rule).
&[i32]is a reference to a slice (&[]i32); the slice is[]i32, and with itsum([1, 2, 3]),sum(ys)andfirst(NAMES)compile and run. The argument-mismatch diagnostic now says so when a parameter is&[]T.