aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-07-13 17:00:25 +0200
committerPierre-Marie Pédrot2016-07-13 17:00:25 +0200
commit9f003b933c2a3504683a84ed817021659e80bc8f (patch)
tree4e9636ca44aed009d2274b03e64313c770a8b026 /kernel
parent7217d14466bf900ec0353b6bbcb7e4d4b78ec2bf (diff)
parent45250332a1e65d434432940a468312f2ab18a2e8 (diff)
Merge branch 'v8.6'
Diffstat (limited to 'kernel')
-rw-r--r--kernel/safe_typing.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/safe_typing.ml b/kernel/safe_typing.ml
index 23c0c1c31b..09f7bd75cd 100644
--- a/kernel/safe_typing.ml
+++ b/kernel/safe_typing.ml
@@ -851,6 +851,9 @@ let export ?except senv dir =
let import lib cst vodigest senv =
check_required senv.required lib.comp_deps;
check_engagement senv.env lib.comp_enga;
+ if DirPath.equal (ModPath.dp senv.modpath) lib.comp_name then
+ CErrors.errorlabstrm "Safe_typing.import"
+ (Pp.strbrk "Cannot load a library with the same name as the current one.");
let mp = MPfile lib.comp_name in
let mb = lib.comp_mod in
let env = Environ.push_context_set ~strict:true