bugKawa - Bugs: bug #36911, SAM conversion

 
 

bug #36911: SAM conversion

Submitter:  Helmut Eller <ellerh>
Submitted:  Sat 21 Jul 2012 01:46:11 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 28 Jul 2012 09:27:01 AM UTC, comment #1: 

SAM-conversion is only supported for a "lambda expression",
not a local variable bound to a lambda.  Perhaps the data-flow analysis makes Kawa think this is OK - certainly something is confusing Kawa.  Not sure what is actually going on ...

Per Bothner <bothner>
Group administrator
Sat 21 Jul 2012 01:46:11 PM UTC, original submission:  

This example:

(define (foo)
  (let ((callback (lambda (event) #!void)))
    (javax.swing.JButton "Convert" action-listener: callback)))


produces this error:


shell> kawa x.scm
gnu.text.SyntaxException:
<unknown>: internal compile error - caught java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file x
    java.lang.ClassLoader.defineClass1(Native Method)
    java.lang.ClassLoader.defineClass(ClassLoader.java:791)
    java.lang.ClassLoader.defineClass(ClassLoader.java:634)
    gnu.bytecode.ArrayClassLoader.loadClass(ArrayClassLoader.java:134)
    gnu.expr.ModuleExp.evalToClass(ModuleExp.java:125)
    gnu.expr.ModuleExp.evalModule1(ModuleExp.java:251)
    kawa.Shell.compileSource(Shell.java:533)
    kawa.Shell.runFile(Shell.java:500)
    kawa.Shell.runFileOrClass(Shell.java:427)
    kawa.repl.main(repl.java:880)
        at gnu.expr.ModuleExp.evalToClass(ModuleExp.java:165)
        at gnu.expr.ModuleExp.evalModule1(ModuleExp.java:251)
        at kawa.Shell.compileSource(Shell.java:533)
        at kawa.Shell.runFile(Shell.java:500)
        at kawa.Shell.runFileOrClass(Shell.java:427)
        at kawa.repl.main(repl.java:880)


Helmut Eller <ellerh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  • -email is unavailable- added by ellerh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-07-28 bothner StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code