aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--interp/constrintern.ml7
1 files changed, 3 insertions, 4 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index 56a191262..5c5a900fb 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -1081,11 +1081,10 @@ let sort_fields ~complete loc fields completer =
begin match proj_kinds with
| [] -> anomaly (Pp.str "Number of projections mismatch")
| (_, regular) :: proj_kinds ->
+ (* "regular" is false when the field is defined
+ by a let-in in the record declaration
+ (its value is fixed from other fields). *)
if first_field && not regular && complete then
- (* G.S.: why do we fail only in the
- first-field case? I would expect to fail
- whenever (not regular && complete), and
- skip the fields only when (not complete *)
user_err_loc (loc, "", str "No local fields allowed in a record construction.")
else if first_field then
build_proj_list projs proj_kinds (idx+1) ~acc_first_idx:idx acc