AddOp not checking its argument

Charles Turner chturne@gmail.com
Mon Jul 30 00:59:00 GMT 2012


We have this behavior:

#|kawa:1|# (+ "whateveriwant")
whateveriwant

I wasn't 100% certain that it's R6RS wrong, couldn't see anything
definitive about the types required as an argument to +, other than
the fact they use "(+ z1 ...)" as its syntax, where z is defined as a
complex number type (the assumption being anything complex or less
numerically general?)

I attach a patch that checks the argument type, but I wasn't sure how
best to do it. Currently I just send the argument through
Arithmetic#asNumeric, as that seems to be how it's done elsewhere.

Charles.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AddOp.patch
Type: application/octet-stream
Size: 1101 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/kawa/attachments/20120730/3894cc21/attachment.obj>


More information about the Kawa mailing list