Skip to content

Commit bbd9b2a

Browse files
author
Jacques Garrigue
committed
Fix PR#6886
git-svn-id: http://caml.inria.fr/svn/ocaml/version/4.02@16153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1 parent 9073f1b commit bbd9b2a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ Bug fixes:
204204
(Mark Shinwell, report by Jean-Christophe Filliâtre)
205205
- PR#6884: The __CYGWIN32__ #define should be replaced with __CYGWIN__
206206
(Adrien Nader)
207+
- PR#6886: -no-alias-deps allows to build self-referential compilation units
208+
(Jacques Garrigue, report by sliquister)
207209
- GPR#143: fix getsockopt behaviour for boolean socket options
208210
(Anil Madhavapeddy and Andrew Ray)
209211
- GPR#190: typo in pervasives

typing/env.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ let rec find_module_descr path env =
441441
let (p, desc) = EnvTbl.find_same id env.components
442442
in desc
443443
with Not_found ->
444-
if Ident.persistent id
444+
if Ident.persistent id && not (Ident.name id = !current_unit)
445445
then (find_pers_struct (Ident.name id)).ps_comps
446446
else raise Not_found
447447
end
@@ -505,7 +505,7 @@ let find_module ~alias path env =
505505
let (p, data) = EnvTbl.find_same id env.modules
506506
in data
507507
with Not_found ->
508-
if Ident.persistent id then
508+
if Ident.persistent id && not (Ident.name id = !current_unit) then
509509
let ps = find_pers_struct (Ident.name id) in
510510
md (Mty_signature(ps.ps_sig))
511511
else raise Not_found

0 commit comments

Comments
 (0)