reflect2.scm 360 B

123456789
  1. ;; Kawa-options: --diagnostic-strip-directories --script %F
  2. (define sb (java.lang.StringBuilder))
  3. (sb:append "abcdefg")
  4. (sb:setLength 3)
  5. (display (sb:toString))(newline)
  6. ;; Diagnostic: reflect2.scm:3:2: warning - no known slot 'append' in java.lang.Object
  7. ;; Diagnostic: reflect2.scm:4:2: warning - no known slot 'setLength' in java.lang.Object
  8. ;; Output: abc