DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B0709: an ordinary call after a pipeline's stage

Catalog status: active. Default severity: error. Stable name: call-after-stage. Family: Syntax and source text.

After filter or map a pipe holds an unfinished pipeline, which an ordinary function cannot take: only a stage or a consumer can follow (see pipelines).

Example (Varc)

fn main() {
    fn report(n: Integer) -> Integer = n;
    let scores: [1..=3]Integer = [70, 45, 90];
    let n: Integer = scores |> filter(s => s >= 50) |> report();
}

What to do

Finish the pipeline first, then pipe its value on: scores |> filter(s => s >= 50) |> count() |> report().

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See syntax and source text, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.