This is the mail archive of the kawa@sources.redhat.com 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]

unusual type conversion in invoke


Hi all,

just discovered an unusual time conversion kawa implicitly does when looking for
appropriate method to invoke.


the following line:

(invoke 'abcd 'indexOf 10)

compiles to:

"abcd".indexOf("10");

i.e. the number 10 becomes the string "10".

a workaround is to explicitly defining the type of constant:

(invoke 'abcd 'indexOf (as <int> 10))

but I cannot imagine the situation when such implicitly conversion might be useful :-(

Regards,

Vladimir



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