Android: more than one definitely applicable method
craven@gmx.net
craven@gmx.net
Fri Jul 27 06:05:00 GMT 2012
Hello Kawaists!
I've run into the following problem when using Kawa 1.12.1 with Android:
Sometimes I get the following warning when a method has been overloaded
for multiple types:
test.scm:42:8: more than one definitely applicable method `put' in android.content.ContentValues
candidate: void android.content.ContentValues.put(java.lang.String,java.lang.Double)
candidate: void android.content.ContentValues.put(java.lang.String,java.lang.Long)
candidate: void android.content.ContentValues.put(java.lang.String,java.lang.Float)
In this case, I have the following code:
(let ((values (<android.content.ContentValues>)))
(let ((oid :: long 5))
(values:put game-_id oid)))
which should probably choose the second candidate. It seems that Kawa
gets confused by the implicit casts between primitive types here, but
I've seen the same problem with <java.lang.String> and
<java.lang.CharSequence>.
Is there any way to tell the compiler that I really want exactly the
method for <long> here?
Thanks for any help!
Peter
More information about the Kawa
mailing list