DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
B0710: more than one _ in a piped call
Catalog status: active. Default severity: error. Stable name: several-placeholders. Family: Syntax and source text.
e |> f(a, _, b) passes e where the _ is. A call has one place for the piped value.
Example (Varc)
fn main() {
fn clamp(lo: Integer, x: Integer, hi: Integer) -> Integer = if x < lo { lo } else if x > hi { hi } else { x };
let y: Integer = 500 |> clamp(_, _, 100);
}
What to do
Keep one _ and write the other argument: 500 |> clamp(0, _, 100).
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.