diff options
| author | Maxime Dénès | 2019-04-04 00:26:20 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2019-04-05 21:16:14 +0200 |
| commit | 73e7bbab4ff6120318ec7b90e4971bfafd09cfb5 (patch) | |
| tree | 75447c936404030e8c8e89b664aef6d978dc8341 /pretyping/nativenorm.ml | |
| parent | 3c06ce8dc3a95e5dfe3a4c0a9acdc7dd5dac75cb (diff) | |
[native compiler] Normalize before destructuring sort
This was making an assertion fail on
https://github.com/coq/coq/issues/9684 after 23f84f37
Diffstat (limited to 'pretyping/nativenorm.ml')
| -rw-r--r-- | pretyping/nativenorm.ml | 7 |
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 |
