typeck
Goal
Thread parsed call-site type/const arguments into the existing InferEngine instantiation paths with positional + _-placeholder binding.
Implementation Sketch
Bind supplied (non-_) arguments positionally to declared type/const params (definition order); _ and unsupplied trailing params infer. Specify mixed type/const binder order (<T, $N>). More-than-declared type args emit an E2004-class arity diagnostic; fewer-than-declared is NOT an arity error.
Spec References
Proposal Semantics + Error Handling; method-generics-grammar-alignment §Instantiation; const-generics replicate<_, 5> placeholder.
Work Items
- Thread call-site type_args into InferEngine method/free-fn instantiation; explicit args override inference.
- Positional +
_-placeholder binding; mixed type/const binder order specified and tested. - More-than-declared type args emit E2004-class arity diagnostic; fewer-than-declared infers, not an error.