|
This is a basic read/print consistency problem. When a symbol
is printed that is anywhere in the fallback list of the
current package, we are dumping it unqualified, even if
it is hidden by a same-named symbol in the current package
itself or such a symbol occurring earlier in the fallback
list.
* lib.c (symbol_needs_prefix): When the to-be-printed symbol
is found in the fallback list, re-scan the current package
for a symbol having the same name, as well as the preceding
nodes in the fallback list. If such a symbol is found, then
the to-be printed symbol must be package-qualified.
* tests/012/syms.expected: New file.
* tests/012/syms.tl: Likewise.
* tests/012/compile.tl: Pull syms into compile job.
* txr.1: Clarify text about this. The existing text's
only reasonable interpretation supports the behavior which
this patch ensures (which is needed on grounds of read/print
consistency) but the text lacks precision.
|