This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange ClassCastException




On 09/20/2014 10:11 PM, Alcides Flores Pineda wrote:
Here is the code just as I typed it in the REPL (and saved it in a file too):

  #|kawa:1|# (define (circle-area radius) (* java.lang.Math:PI (expt radius 2)))

And I got this result/exception when calling it (or running the file
with kawa -f):

#|kawa:2|# (circle-area 3)
java.lang.ClassCastException: java.lang.Double cannot be cast to gnu.math.Numeric

I checked in a fix for this.  I also checked in a testcase based on your report.

I'm also thinking about some tweaks to code-generation that avoid this problem,
but the current check-in should be ok for now.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]