This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Dead variable compiler error


Hi,

Maybe I'm doing something wrong, but the code below results in the following
compiler error (using Kawa 1.7.90 on Windows XP with the JDK 1.4.1_01):

(dboucher@Forman) (14:28:16) [tmp] kawa -C test.scm (compiling test.scm)
Internal error while compiling test.scm:15
java.lang.Error: attempting to push dead variable
        at gnu.bytecode.CodeAttr.emitLoad(CodeAttr.java:1047)
        at gnu.expr.Declaration.load(Declaration.java:140)
        at gnu.expr.ReferenceExp.compile(ReferenceExp.java:118)
        ....

;---------------------------------------------
(module-name <test>)
(module-static #t)
(module-export <A>)

(define-simple-class <A> (<java.lang.Object>)
  ((execute (x :: <int>) (y :: <int>) (z :: <int>) (w :: <int>)) :: <void>
   #!void))


(define-simple-class <B> (<A>)
  (objects type: <list> init-keyword: objects:)
  ((execute (x :: <int>) (y :: <int>) (z :: <int>) (w :: <int>)) :: <void>
   (for-each
    (lambda (object :: <A>)
      (invoke object 'execute x y z y))
    objects)))
;----------------------------------------------

If I remove the (module-export <A>) clause or add <B> to the exported
variables, everything works fine. 
Any idea?

Dominique Boucher, Ph.D.
Lead Developer
Nü Écho Inc
www.nuecho.com
Tél: (514) 861-3246 x 231



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]