aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/safe_typing.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-07-07 20:27:56 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-07-07 20:31:30 +0200
commit17d8a49247ad82ca59def4c577031101f61bbf08 (patch)
tree8ee004df8d6ff7e252f346e3593169e374de8796 /kernel/safe_typing.ml
parent21be7a5dba2fdfa40fd7b4a3d94610947d202bb7 (diff)
parent947b30150602ba951efa4717d30d4a380482a963 (diff)
Merge branch 'v8.5' into v8.6
Diffstat (limited to 'kernel/safe_typing.ml')
-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 23c0c1c31..09f7bd75c 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