bugKawa - Bugs: bug #47688, Macros involving integer literals...

 
 

bug #47688: Macros involving integer literals outside the range of int cause "no method to construct ClassType gnu.math.IntNum"

Submitted by:  Nathan S. <nathans>
Submitted on:  Wed 13 Apr 2016 06:18:40 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Compile-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.

 

Wed 13 Apr 2016 09:36:34 PM UTC, comment #3:

It turned out that a "cleanup" on 2015-05-10 had removed an IntNum factory method intended to handle this case. Oops.
I put the method back, and added some testcases.
Thanks for your bug report.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Wed 13 Apr 2016 06:43:50 PM UTC, comment #2:

Indeed. This is an inconsistency beteeen the Externalizable interface (readExternalwriteExternal) methods in IntNum and the constructors int IntNum.

Kawa literals are handled by (if the iteral's class implements Externalizable) calling writeExternal, and then looking for a matching constructor or valueOf method.

There are various solutions (including special-caing IntNum in the literal support). I'll take a look.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Wed 13 Apr 2016 06:31:59 PM UTC, comment #1:

On further examination it isn't just macros.
and
also fail to compile.

Nathan S. <nathans>
Wed 13 Apr 2016 06:18:40 PM UTC, original submission:

Macros involving literals outside the range of int cause compilation to fail with "no method to construct ClassType gnu.math.IntNum". This bug only happens when compiling code, not when running an interactive shell.

Steps to reproduce:

1. Create a file named test.scm consisting only of the text:

2. Execute the command:

Nathan S. <nathans>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36919:  test.scm added by nathans (103B - application/vnd.lotus-screencam)

 

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)
  • -unavailable- added by nathans (Submitted the item)
  •  

    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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 13 Apr 2016 09:36:34 PM UTCbothnerStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 13 Apr 2016 06:43:50 PM UTCbothnerStatusNone=>Confirmed
      Assigned toNone=>bothner
    Wed 13 Apr 2016 06:18:40 PM UTCnathansAttached File-=>Added test.scm, #36919

    Back to the top


    Powered by Savane 3.1-cleanup1