Trigger deprecated attribute when referring to a deprecated module itself (not one of its components): now for external unit as long as we don't compile with -no-alias-deps.

master
alainfrisch 2015-12-01 17:27:30 +01:00
parent c424dd963a
commit e9e3da700d
1 changed files with 4 additions and 1 deletions

View File

@ -797,7 +797,10 @@ and lookup_module ~load lid env : Path.t =
with Not_found ->
if s = !current_unit then raise Not_found;
if !Clflags.transparent_modules && not load then check_pers_struct s
else ignore (find_pers_struct s);
else begin
let ps = find_pers_struct s in
report_deprecated lid ps.ps_comps.deprecated
end;
Pident(Ident.create_persistent s)
end
| Ldot(l, s) ->