user=> (eval `'())
()
user=> `'~(map identity ())
(quote ())
user=> (eval `'~(map identity ())) ;; expected: ()
CompilerException java.langUnsupportedOperationException: 未知集合类型,编译:(NO_SOURCE_PATH:5:1)
user=> (prn *e)
#error {
:cause "未知集合类型"
:via
[{:type clojure.lang.Compiler$CompilerException
:message "java.langUnsupportedOperationException: 未知集合类型, compiling:(NO_SOURCE_PATH:5:1)"
:at [clojure.lang.Compiler analyzeSeq "Compiler.java" 6730]}
{:type java.langUnsupportedOperationException
:message "未知集合类型"
:at [clojure.lang.Compiler$EmptyExpr emit "Compiler.java" 2929]}]
:trace
[[clojure.lang.Compiler$EmptyExpr emit "Compiler.java" 2929]
[clojure.langCompiler$BodyExpr emit "Compiler.java" 5905]
[clojure.langCompiler$FnMethod doEmit "Compiler.java" 5453]
[clojure.langCompiler$FnMethod emit "Compiler.java" 5311]
[clojure.langCompiler$FnExpr emitMethods "Compiler.java" 3843]
[clojure.langCompiler$ObjExpr compile "Compiler.java" 4489]
[clojure.langCompiler$FnExpr parse "Compiler.java" 3983]
[clojure.langCompiler analyzeSeq "Compiler.java" 6721]
[clojure.langCompiler analyze "Compiler.java" 6524]
[clojure.langCompiler eval "Compiler.java" 6779]
[clojure.langCompiler eval "Compiler.java" 6745]
[clojure.core$eval invoke "core.clj" 3081]
;; 省略其余部分
nil
user=> (eval `'~(map identity '(x)))
(x)
*原因:* 在空列表的情况下,编译器在这里看到一个LazySeq。我怀疑堆栈中的早期部分应该生成一个空列表,但还没有追踪到。