aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-04-08 10:14:03 +0200
committerPierre-Marie Pédrot2019-04-08 10:14:03 +0200
commit81df7850d40273814fcf78cf6df9057f19fa9a8e (patch)
tree9ef3b6559cd052152cd2896463795c66b7b8d146 /pretyping
parenta4c4116207504b048863fb713699380326353fbf (diff)
parent44a669e591ee00bcea65b229429dcb5d4d3515ec (diff)
Merge PR #9900: [native compiler] Fix critical bug with stuck primitive projections
Ack-by: SkySkimmer Reviewed-by: Zimmi48 Ack-by: maximedenes Reviewed-by: ppedrot
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/nativenorm.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/pretyping/nativenorm.ml b/pretyping/nativenorm.ml
index 0b2d760ca8..0003fc7280 100644
--- a/pretyping/nativenorm.ml
+++ b/pretyping/nativenorm.ml
@@ -222,7 +222,12 @@ and nf_type_sort env sigma v =
match kind_of_value v with
| Vaccu accu ->
let t,s = nf_accu_type env sigma accu in
- let s = try destSort s with DestKO -> assert false in
+ let s =
+ try
+ destSort (whd_all env s)
+ with DestKO ->
+ CErrors.anomaly (Pp.str "Value should be a sort")
+ in
t, s
| _ -> assert false