aboutsummaryrefslogtreecommitdiff
path: root/vernac
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-11-07 23:14:53 +0100
committerEmilio Jesus Gallego Arias2020-11-09 17:24:19 +0100
commitb1cb26eed7bdde340aeacf23e1bc461eb06c4ddd (patch)
treed7b10d4c23f46e45903dd612781740ae2b90a793 /vernac
parentd2047c6368ae11a3a3fd7f2db8c991d135094e60 (diff)
[obligation] Proper handle no obligations on `Next Obligation`
Fixes #13320 . Trivial programming error, actually this is handled better in a further refactoring branch not submitted due to the long time the whole rework took.
Diffstat (limited to 'vernac')
-rw-r--r--vernac/declare.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/vernac/declare.ml b/vernac/declare.ml
index 0baae6eca5..367d0bf944 100644
--- a/vernac/declare.ml
+++ b/vernac/declare.ml
@@ -2499,7 +2499,12 @@ let admit_obligations ~pm n =
let next_obligation ~pm n tac =
let prg = match n with
- | None -> State.first_pending pm |> Option.get
+ | None ->
+ begin match State.first_pending pm with
+ | Some prg -> prg
+ | None ->
+ Error.no_obligations None
+ end
| Some _ -> get_unique_prog ~pm n
in
let {obls; remaining} = Internal.get_obligations prg in