syntax-quote leaves interop forms unqualified (jolt-z1zu)
A macro that syntax-quoted interop — `(.. (StringBuilder.) (.append x)) — had its .method / Class. / .-field heads qualified to the compile ns (user/.append, user/StringBuilder.), so they read as 'Unknown class user' at expansion. Like Clojure, leave interop-head symbols bare in syntax-quote. Fixes any macro templating interop, not just the one corpus case. Corpus 2694->2695.
This commit is contained in:
parent
f15a4e7747
commit
518683ccd6
2 changed files with 3 additions and 2 deletions
|
|
@ -215,6 +215,7 @@
|
|||
(let ((g (hc-sq-gensym (substring nm 0 (- (string-length nm) 1)))))
|
||||
(hashtable-set! gsmap nm g) g)))
|
||||
((hc-special-symbol? nm) form) ; special form: leave bare
|
||||
((hc-interop-head? nm) form) ; interop (.method / Class. / .-field): bare
|
||||
((var-cell-lookup "clojure.core" nm) (jolt-symbol "clojure.core" nm))
|
||||
(else (jolt-symbol (chez-actx-cns ctx) nm))) ; else: qualify to compile ns
|
||||
;; qualified (a real ns or an alias): ns aliases aren't modeled on the Chez
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue