bugKawa - Bugs: bug #46728, java.lang.VerifyError when class...

 
 

bug #46728: java.lang.VerifyError when class that inherits another class is the same name as the file on kawa 2.1

Submitted by:  None
Submitted on:  Sun 20 Dec 2015 07:39:21 PM UTC  
 
Category: Code generationSeverity: 3 - Normal
Item Group: Run-time exceptionStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 10 Apr 2016 03:31:32 AM UTC, comment #2:

I checked in a fix for this.
I also checked in your test-case.
If you want credit in the testsuite/ChangeLog, let me know.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 09 Apr 2016 05:44:41 AM UTC, comment #1:

This is somewhat tricky.

The first part of the fix is that this situation (when the "module class" is the same as an explicit class) should act as if we specified-module-static-run. The part is that we don't create a "run" method in the -module-static-run case.

I'm working on a fix along those lines, but it isn't quite working yet.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sun 20 Dec 2015 07:39:21 PM UTC, original submission:

When I have file

x.scm
(define-simple-class x ()
(q 0)
((init) #!void)
((fn) 1))

z.scm
(import (x))
(define-simple-class z (x)
((init) #!void)
((fn2) 2))

I compile with
kawa -C x.scm z.scm

java -cp kawa-2.1.jar:../ kawa.repl
(define p (z))

Exception in thread "main" java.lang.VerifyError: class z overrides final method run.(Lgnu/mapping/CallContext;)V

If I change the z.scm to following
(import (x))
(define-simple-class not-z (x)
((init) #!void)
((fn2) 2))

kawa -C x.scm z.scm

java -cp kawa-2.1.jar:../ kawa.repl
(define p (not-z))
p:q => 0

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 13 Apr 2016 09:37:09 PM UTCbothnerOpen/ClosedOpen=>Closed
    Sun 10 Apr 2016 03:31:32 AM UTCbothnerStatusIn Progress=>Fixed
    Sat 09 Apr 2016 05:44:41 AM UTCbothnerStatusNone=>In Progress
      Assigned toNone=>bothner

    Back to the top


    Powered by Savane 3.1-cleanup1