Le dimanche 20 décembre 2015 à 06:12 -0800, Lutfullah Tomak a écrit :
> type T1
> x::Int #It can be any type
> end
> Base.convert(::Type{T1}, x::Int)=T1(x)
> a = T1[1:3;]
> a' #--> gives error trying to convert T1 to Int.
> b = T1[1:3;]
> b[1] = a[1] #--> the same error
> b[1] = T1(1) #--> No error
>
> Somehow, right hand side is being converted to Int while assigning to
> left hand side from getindex.
> Is this right behavior? On julia 0.4.2 windows 10 64bit.
This works fine here. Have you tried restarting with a clean session?
Regards