I am following this series to learn how clojure compiler works.
I tried to invoke eval method of StaticMethodExpr using below codes
(ns clojure.lang
(:use clojure.core)
(:import [clojure.lang Compiler Compiler$C]))
(def form (read-string "(+ 1 1)") )
(def expr (Compiler/analyze Compiler$C/EXPRESSION form))
(.eval expr)
but no luck and throw IllegalArgumentException:
Unhandled java.lang.IllegalArgumentException
Can't call public method of non-public class: public
java.lang.Object clojure.lang.Compiler$StaticMethodExpr.eval()
Is there anything I was missing or is this a bug in jdk ?