;; Test run-time reflection.
;; Testcase from Bill Robinson <airbaggins@gmail.com>
(define-simple-class TestClass ()
  ((test (arg :: int)) :: void
   (java.lang.System:out:format "test %d\n" arg)))

(let ((t ::TestClass (TestClass))
      (method 'test))
  (invoke t 'test 1)
  (invoke t method 2))

;; Output: test 1
;; Output: test 2


;; Test run-time reflection.
;; Testcase from Bill Robinson <airbaggins@gmail.com>
(define-simple-class TestClass ()
  ((test (arg :: int)) :: void
   (java.lang.System:out:format "test %d\n" arg)))

(let ((t ::TestClass (TestClass))
      (method (string-copy "test"))) ;; avoid unintended inlining
  (invoke t 'test 1)
  (invoke t method 2))

;; Output: test 1
;; Output: test 2


Use string-copy to avoid risk of unintended inlining.
Use string-copy to avoid risk of unintended inlining.


git-svn-id: 169764d5f12c41a1cff66b81d896619f3ce5473d@7118 5e0a886f-7f45-49c5-bc19-40643649e37f
