type T1
x::Int #It can be any type
end
#x instead of x::Int (The type given in type definition)
Base.convert(::Type{T1}, x)=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) #--> the same error

Reply via email to