E3017
E3017 — Closure argument count or type mismatch
No example yet
No fixture in the test suite asserts this code, so there is no program here that is known to trigger it. That is a gap in our coverage rather than a statement about the code.
Contributing one is a good first change — add a fixture under tests/ with a CHECK line naming E3017, and this page picks it up.
Related
A tour of VxThe chapter covering the rule this code enforces.
All diagnosticsEvery code the compiler can emit, grouped by stage.
E3016A generic call that leaves one of the callee's type parameters unbound: no argument fixes it, and no type declared for the result does either. Left alone, the parameter travelled into the instance's symbol name as its bare letter and
sizeof<T>() folded to 8, so a buffer was sized for an element type that was never chosen. Spell the type argument out, as Vec<i32>::new(), or give the result a type, as let v : Vec<i32> = Vec::new();.
E3018An array literal whose elements are not scalars, or which is empty. An array literal lowers to tensor.from_elements, whose element type must be a scalar, so [a, b] for tensors — placed or not — has nothing to lower to, and an empty literal has no element type to give it. Both used to be accepted by the checker (the element type silently stayed at its f32 default) and then crash codegen with an internal error rather than a diagnostic. See Vx#354.