Skip to content

Commit

Permalink
if a binding exists in multiple usings, prefer a non-deprecated one
Browse files Browse the repository at this point in the history
This removes a spurious warning if Base.X is deprecated to Mod.X,
and one does `using Mod`. `X` is available from both `Base` and
`Mod`, but we asked for the non-deprecated one so there should
be no warning.
  • Loading branch information
JeffBezanson committed Oct 12, 2016
1 parent ca4394b commit 6aac3c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ static jl_binding_t *jl_get_binding_(jl_module_t *m, jl_sym_t *var, modstack_t *
(void)jl_get_binding_wr(m, var);
return NULL;
}
owner = imp;
b = tempb;
if (owner == NULL || !tempb->deprecated) {
owner = imp;
b = tempb;
}
}
}
if (owner != NULL) {
Expand Down

0 comments on commit 6aac3c8

Please sign in to comment.