Commit a805b30d authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Fixed type bug with printing slot-value with obj/slot being a non-list.

parent 319d2663
......@@ -379,10 +379,10 @@ vice-versa.")
:collect nil)))
(defprinter js-slot-value (obj slot)
(append-to-last (if (eql 'js-variable (car obj))
(append-to-last (if (and (listp obj) (eql 'js-variable (car obj)))
(ps-print obj %start-pos%)
(list (format nil "~A" (ps-print obj %start-pos%))))
(if (eql 'script-quote (car slot))
(if (and (listp slot) (eql 'script-quote (car slot)))
(format nil ".~A" (if (symbolp (second slot))
(js-translate-symbol (second slot))
(first (ps-print slot 0))))
......@@ -285,4 +285,8 @@ x = 2 + sideEffect() + x + 5;")
(test-ps-js obj-literal-strings
(create "foo" 2)
"{ 'foo' : 2 }")
\ No newline at end of file
"{ 'foo' : 2 }")
(test-ps-js slot-value-string
(slot-value foo "bar")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment