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]

AddOp not checking its argument


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.

Attachment: AddOp.patch
Description: Binary data


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