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]

lambda expr initialization with define-simple-class


If I use a lambda expression inside a define-simple-class method, the
lambda expression doesn't get initialized properly.  For example,
my-method below should return a ModuleMethod but instead returns null:

    (module-name <Foo>)

    (define-simple-class <Bar> ()
      ((my-method)
       (lambda (x) x)))

(A busy week for bug hunting - very exciting!  Thanks for your
patience.)

Regards,
Chris Dean

P.S. The work around  is to use a helper procedure outside of
     define-simple-class:

    (module-name <Foo>)
    (module-static #t)

    (define-simple-class <Bar> ()
      ((my-method)
       (my-method-helper)))

    (define (my-method-helper)
      (lambda (x) x))



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