Is imImage an abstract type? That would account for both behaviors.
Julia's type parameters are "invariant", which means that Array{Int,1} is
not a subtype of Array{Real,1}. The documentation talks about this in the
parametric section: Parametric Composite Types
<http://docs.julialang.org/en/latest/manual/types/#parametric-composite-types>.
Searching for invariant and covariant will bring up a bunch of threads
here, too.
On Tuesday, June 17, 2014 11:55:05 AM UTC-4, J Luis wrote:
>
> Hi, this is a continuation of what I by mistake posted in devs-list
>
> https://groups.google.com/forum/?fromgroups=#!topic/julia-dev/GojOx4nI-xo
>
> that now stroke me again (in another place)
>
> function imcdCanvasPutImage(_canvas, _image, _x, _y, _w, _h, _xmin, _xmax,
> _ymin, _ymax)
> println("typeof(_image): ", _image)
> println("isa(_image, Ptr{imImage}): ", isa(_image, Ptr{imImage}))
>
> which when execute prints this astonishing conclusion
>
> C:\programs\Gits\IUP.jl\src>c:\programs\julia64\julia execa.jl
> typeof(_image): Ptr{imImage} @0x0000000000180c30
> isa(_image, Ptr{imImage}): false
>
> However, when I try to reproduce this on the REPL, than it works
>
> Joaquim
>