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]

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


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