This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Android: more than one definitely applicable method
- From: <craven at gmx dot net>
- To: kawa mailing list <kawa at sourceware dot org>
- Date: Fri, 27 Jul 2012 08:05:00 +0200
- Subject: Android: more than one definitely applicable method
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