aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interp/constrintern.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index 18fd16279f..0964370901 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -264,6 +264,9 @@ let set_var_scope loc id istermvar (_,_,scopt,scopes) ntnvars =
try
let idscopes,typ = List.assoc id ntnvars in
if !idscopes <> None &
+ (* scopes have no effect on the interpretation of identifiers, hence
+ we can tolerate having a variable occurring several times in
+ different scopes: *) typ <> NtnInternTypeIdent &
make_current_scope (Option.get !idscopes)
<> make_current_scope (scopt,scopes) then
error_inconsistent_scope loc id