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]

Re: Warning elimination


Hi Chris Dean,

>     (define-namespace io-file "class:java.io.File")
> 
>     (define (file-date file)
>       (io-file:lastModified
>        (if (string? file) 
>            (io-file:new (as <string> file))
>            file)))

Thanks Chris for the advice about using `as'. I suspect <String> may be a
better choice because the Kawa string is implicitly coerced to a Java
string/Kawa symbol.

Regards,
Adam


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