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]

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)



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