This PR changes the counter-example accumulator in the match compiler from a `List` (built with cons, producing reverse order) to an `Array` (built with push, preserving declaration order). Missing cases are now reported in the order constructors appear in the inductive type definition. For example, given `inductive Enum | a | b | c | d`, missing cases `c` and `d` were previously shown as `d, c` and are now shown as `c, d`. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
10 lines
258 B
Text
10 lines
258 B
Text
matchUnknownFVarBug.lean:2:2-2:7: error: Missing cases:
|
|
none, none
|
|
none, (some _)
|
|
(some (Nat.succ _)), none
|
|
(some (Nat.succ _)), (some _)
|
|
matchUnknownFVarBug.lean:3:18-3:19: error: unsolved goals
|
|
n? x✝ : Option Nat
|
|
h : n? = some 0
|
|
h' : n? = x✝
|
|
⊢ False
|