This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Removing method warning
- From: Chris Dean <ctdean at sokitomi dot com>
- To: Kawa List <kawa at sources dot redhat dot com>
- Date: Thu, 06 May 2004 23:16:23 -0700
- Subject: Removing method warning
Is there a way to get rid of this warning when compile the code below?
The real issue is that we end up looking up the method at run time,
instead of at compile time.
Regards,
Chris Dean
(define-namespace timestamp "class:java.sql.Timestamp")
(define (foo a b)
(timestamp:compareTo (as <java.sql.Timestamp> a)
(as <java.sql.Timestamp> b)))
unix% java kawa.repl -C Foo.scm
(compiling Foo.scm)
Foo.scm:14:4: warning - more than one definitely applicable method `compareTo' in java.sql.Timestamp
Foo.scm:14:4: warning - candidate: int java.util.Date.compareTo(java.util.Date)
Foo.scm:14:4: warning - candidate: int java.sql.Timestamp.compareTo(java.lang.Object)
Foo.scm:14:4: warning - candidate: int java.sql.Timestamp.compareTo(java.sql.Timestamp)