Guest User

aot compilation problem

a guest
Aug 26th, 2011
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;; src/net/foo.clj
  2.  
  3. (ns net.foo)
  4.  
  5. (defn start-server []
  6.   (println "Server started!"))
  7.  
  8. (defprotocol IFoo
  9.   (start [_]))
  10.  
  11. (defrecord Foo []
  12.   IFoo
  13.   (start [_]
  14.     (start-server)))
  15.  
  16. ;; usage example
  17.  
  18. Foo f = new Foo();
  19. f.start();
  20.  
  21. ;; exception
  22.  
  23. Exception in thread "main" java.lang.IllegalStateException: Var hypernet.foo/start-server is unbound.
  24.     at clojure.lang.Var.deref(Var.java:142)
  25.     at clojure.lang.Var.get(Var.java:133)
  26.     at hypernet.foo.Foo.start(foo.clj:12)
  27.     at hypernet.test.HyperTest.<init>(HyperTest.java:10)
  28.     at hypernet.test.HyperTest.main(HyperTest.java:31)
Advertisement
Add Comment
Please, Sign In to add comment