Skip to content

Commit 1faa7e5

Browse files
committed
refactor: processLeaf: Only look at first alt
1 parent 47dbcd4 commit 1faa7e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Lean/Meta/Match/Match.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@ where
328328
trace[Meta.Match.match] "missing alternative"
329329
p.mvarId.admit
330330
modify fun s => { s with counterExamples := p.examples :: s.counterExamples }
331-
| alt :: alts =>
331+
| alt :: _ =>
332332
unless (← solveCnstrs p.mvarId alt) do
333-
go alts
333+
throwErrorAt alt.ref "Dependent match elimination failed: Could not solve constraints"
334334

335335
private def processAsPattern (p : Problem) : MetaM Problem := withGoalOf p do
336336
let x :: _ := p.vars | unreachable!

0 commit comments

Comments
 (0)