Thanks Tovio
> unless JString <: String (but I guess it isn't?).
No, indeed, JString is not a subtype of a Julia string. It is simply a
wrapper around a pointer. It has no string-like behaviour in Julia, other
than being able to be converted back and forth from a Julia string.
> it seems to me that your method can never be an identity conversion
I could write a method definition such as
convert(::Type{JString}, str::JString) = str
I suppose that should be safe, but I don't understand why that should be
necessary, or what benefit it will have.
On Tuesday, 5 May 2015 11:38:38 UTC+1, Toivo Henningsson wrote:
>
> This looks like a julia bug, unless JString <: String (but I guess it
> isn't?).
>
> The method from Base is the generic identity conversion, but it seems to
> me that your method can never be an identity conversion?