bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #52390] kawa 3.0 anonymous class instantiation in map is


From: Per Bothner
Subject: [Bug-kawa] [bug #52390] kawa 3.0 anonymous class instantiation in map issue
Date: Fri, 10 Nov 2017 18:04:59 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36

Update of bug #52390 (project kawa):

                  Status:                    None => Confirmed              
             Assigned to:                    None => bothner                

    _______________________________________________________

Follow-up Comment #1:

It is definitely supposed to create only one subclass - classes are generally
generated at compile-time (or load-time if you think of the actual Class
object, not during execution.

The problem is how 'map' is inlined to a loop.  The bug is that there is only
one variable for 'prefix', and each instance shares the same 'prefix'.

Here is a work-around:

(let ((v (map (lambda (prefix0)
                (object (java.lang.Object)
                        (prefix prefix0)
                  ((my-method value) (string-append prefix "-" (number->string
value)))))
           (list "ALPHA" "BETA" "GAMMA"))))
   ....

New bugs should probably be reported on the gitlab bug-tracker.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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