summaryrefslogtreecommitdiffstats
path: root/tests/012/syms.expected
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-10-12 00:42:16 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-10-12 00:42:16 -0700
commitf2ba3dfc996bfcd67a723b23754e808276ab3b9f (patch)
tree8f9e81e66511ec5fe8d54eb59e66b1add696c25f /tests/012/syms.expected
parent2034e70be87fa1635b7e5a445450c1777c16d2ba (diff)
downloadtxr-f2ba3dfc996bfcd67a723b23754e808276ab3b9f.tar.gz
txr-f2ba3dfc996bfcd67a723b23754e808276ab3b9f.tar.bz2
txr-f2ba3dfc996bfcd67a723b23754e808276ab3b9f.zip
printer: bug: fallback syms printed without prefix.
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.
Diffstat (limited to 'tests/012/syms.expected')
-rw-r--r--tests/012/syms.expected6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/012/syms.expected b/tests/012/syms.expected
new file mode 100644
index 00000000..bfe9f694
--- /dev/null
+++ b/tests/012/syms.expected
@@ -0,0 +1,6 @@
+(loc-0 loc-1 loc-2 cons)
+(loc-0 loc-1 loc-2 cons)
+(fb-2:loc-0 fb-2:loc-1 loc-2 cons)
+(loc-0 loc-1 loc-2 cons)
+(fb-2:loc-0 fb-2:loc-1 loc-2 cons)
+(fb-1:loc-0 loc-1 loc-2 cons)