In patterns, ellipsis should always fill in each remaining argument as an implicit argument, even if it is an optparam or autoparam. This prevents examples such as the one in #4555 from failing: ```lean match e with | .internal .. => sorry | .error .. => sorry ``` The `internal` constructor has an optparam (`| internal (id : InternalExceptionId) (extra : KVMap := {})`). We may consider having ellipsis suppress optparams and autoparams in general. We avoid doing so for now since it's possible to opt-out of them individually (for example with `.internal (extra := _) ..`) but it's not possible to opt-in, and it is plausible that `..` with optparams is useful in contexts such as the `refine` tactic. With patterns however, it is hard to imagine a use case that offsets the inconvenience of optparams being eagerly supplied. Closes #4555 |
||
|---|---|---|
| .. | ||
| bench | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| common.sh | ||
| lean-toolchain | ||