bugKawa - Bugs: bug #11427, <java.lang.Integer> in the...


bug #11427: <java.lang.Integer> in the interpreter gives ClassCastException

Submitted by:  Dean Ferreyra <dferreyra>
Submitted on:  Wed 29 Dec 2004 02:46:51 AM UTC  
Category:  Scheme language Severity:  3 - Normal
Item Group:  Run-time exception Status:  Remind
Privacy:  Public Assigned to:  Per Bothner <bothner>
Open/Closed:  Open

Add a New Comment (Rich Markup)

You are not logged in

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


Sat 11 Feb 2006 02:11:44 AM UTC, comment #2:

I checked the test case into the test suite.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Fri 18 Mar 2005 06:12:53 AM UTC, comment #1:

This actually works now, thanks to the recent generalization of the implementation of + and -.

I'm not closing the bug report, because the work to handling Integer is incomplete.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Wed 29 Dec 2004 02:46:51 AM UTC, original submission:


(define seven (make <java.lang.Integer> 7))
(- (as <int> seven) 3)

does not work from the interpreter, giving this on a build from a CVS pull I did today:

thallium% java -classpath ~/share/java/kawa-1.7.91.jar kawa.repl
#|kawa:1|# (define seven (make <java.lang.Integer> 7))(- (as <int> seven) 3)
Invalid parameter, was: null
at gnu.kawa.functions.AddOp.apply2(AddOp.java:32)
at gnu.kawa.functions.AddOp.applyN(AddOp.java:73)
at gnu.kawa.functions.AddOp.applyN(AddOp.java:88)
at gnu.mapping.Procedure.apply(Procedure.java:123)
at gnu.mapping.Procedure.apply(Procedure.java:115)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:240)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:212)
at kawa.Shell.run(Shell.java:231)
at kawa.Shell.run(Shell.java:177)
at kawa.Shell.run(Shell.java:164)
at kawa.Shell.run(Shell.java:151)
at kawa.repl.main(repl.java:672)

Compiling the expressions and running the resulting code works fine and gives the right result.

Dean Ferreyra <dferreyra>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


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

Only logged-in users can vote.




Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-03-18 bothner StatusNone => Remind
    Assigned toNone => bothner

Back to the top

Powered by Savane 3.4