bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #39940] Class member of type <procedure> compilation exc


From: Matthieu Vachon
Subject: [Bug-kawa] [bug #39940] Class member of type <procedure> compilation exception
Date: Wed, 04 Sep 2013 13:47:30 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?39940>

                 Summary: Class member of type <procedure> compilation
exception
                 Project: Kawa
            Submitted by: maoueh
            Submitted on: Wed 04 Sep 2013 01:47:29 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Consider the following snippet:


(define-simple-class <Simple> (<Object>)
  (callback type: <procedure>)

  ((*init*)
   (set! callback (lambda _ (format #t "Working~%")))))


This snippet will not compile and will generate a `NullPointerException`.
However, changing the member `(callback type: <procedure>)` to `(callback
type: <procedure> init-value: (lambda _ #f))` will pass compilation correctly.
In fact, adding any init-value seems to work correctly (compilation pass, but
as expected, a ClassCastException is thrown when init-value is not a
procedure).

I attached my test-case to this bug report.

Regards,
Matt



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 04 Sep 2013 01:47:29 PM GMT  Name: procedure-set.scm  Size: 315B  
By: maoueh
Test case
<http://savannah.gnu.org/bugs/download.php?file_id=29005>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39940>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]