summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stdlib/match.tl2
-rw-r--r--tests/019/redef.tl19
2 files changed, 20 insertions, 1 deletions
diff --git a/stdlib/match.tl b/stdlib/match.tl
index fb11aa4f..149ea71f 100644
--- a/stdlib/match.tl
+++ b/stdlib/match.tl
@@ -1088,7 +1088,7 @@
((sys:hash-lit nil . @(all (@key @val)))
^@(hash ,*(zip [mapcar transform-qquote key]
[mapcar transform-qquote val])))
- ((sys:hash-lit)
+ ((sys:hash-lit . @(eq nil))
'@(hash))
((sys:struct-lit @type . @args)
^@(struct ,(transform-qquote type)
diff --git a/tests/019/redef.tl b/tests/019/redef.tl
new file mode 100644
index 00000000..036fb8c9
--- /dev/null
+++ b/tests/019/redef.tl
@@ -0,0 +1,19 @@
+(load "../common")
+
+(defun foo () :foo)
+
+(defvar foov :foov)
+
+(defun bar () (list (foo) foov))
+
+(compile 'bar)
+
+(test (bar) (:foo :foov))
+
+(defun foo () :bar)
+
+(makunbound 'foov)
+
+(defparml foov :barv)
+
+(test (bar) (:bar :barv))