diff options
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/2181.v | 3 | ||||
| -rw-r--r-- | toplevel/record.ml | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test-suite/bugs/closed/shouldsucceed/2181.v b/test-suite/bugs/closed/shouldsucceed/2181.v new file mode 100644 index 0000000000..62820d8699 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/2181.v @@ -0,0 +1,3 @@ +Class C. +Parameter P: C -> Prop. +Fail Record R: Type := { _: C; u: P _ }. diff --git a/toplevel/record.ml b/toplevel/record.ml index 36d29c1a17..6d94e9a856 100644 --- a/toplevel/record.ml +++ b/toplevel/record.ml @@ -146,7 +146,10 @@ let subst_projection fid l c = match List.nth l (k-depth-2) with | Projection t -> lift depth t | NoProjection (Name id) -> bad_projs := id :: !bad_projs; mkRel k - | NoProjection Anonymous -> assert false + | NoProjection Anonymous -> + errorlabstrm "" (str "Field " ++ pr_id fid ++ + str " depends on the " ++ str (ordinal (k-depth-1)) ++ str + " field which has no name.") else mkRel (k-lv) | _ -> map_constr_with_binders succ substrec depth c |
