diff options
| author | Pierre-Marie Pédrot | 2020-02-18 21:35:55 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-02-18 21:35:55 +0100 |
| commit | 43c3c7d6f62a9bee4772242c27fbafd54770d271 (patch) | |
| tree | 5b7088e00a7c93f9bc28cad50a20774b0d51d649 /interp/constrextern.ml | |
| parent | f208f65ee8ddb40c9195b5c06475eabffeae0401 (diff) | |
| parent | 6a630e92a2c0972d78e724482c71b1f7f7232369 (diff) | |
Merge PR #11530: Fixes custom entries precedence bugs (#11331 part)
Reviewed-by: Zimmi48
Reviewed-by: ppedrot
Diffstat (limited to 'interp/constrextern.ml')
| -rw-r--r-- | interp/constrextern.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml index c198c4eb9b..06232b8e1a 100644 --- a/interp/constrextern.ml +++ b/interp/constrextern.ml @@ -792,9 +792,11 @@ let rec flatten_application c = match DAst.get c with let extern_possible_prim_token (custom,scopes) r = let (sc,n) = uninterp_prim_token r in - match availability_of_entry_coercion custom InConstrEntrySomeLevel with - | None -> raise No_match - | Some coercion -> + let coercion = + if entry_has_prim_token n custom then [] else + match availability_of_entry_coercion custom InConstrEntrySomeLevel with + | None -> raise No_match + | Some coercion -> coercion in match availability_of_prim_token n sc scopes with | None -> raise No_match | Some key -> insert_coercion coercion (insert_delimiters (CAst.make ?loc:(loc_of_glob_constr r) @@ CPrim n) key) |
