Tuple{} is v0.4 syntax. on v0.3 use ( ) or Compat.

On Fri, Jul 10, 2015 at 3:29 AM Scott Noel-Hemming <[email protected]>
wrote:

> I'm sure I'm missing something obvious here, but can anyone point me to
> where I should look to explain this behavior:
>
> immutable MyArray <: MyType
>   prefix::Char
>   values::Array{MyType}
>
>   MyArray(values::Array{MyType}) = new('*', values::Array{MyType})
>   #MyArray(values::Tuple{MyType}) = new(collect(values::Tuple{MyType}))
> end
> #MyArray(values::Tuple{MyType}) = MyArray(collect(values::Tuple{MyType}))
>
>
> I've included a couple, commented out, attempts that don't appear to work.
> The main goal is to provide provide a constructor method which takes an
> Array or a Tuple type for the values argument. Both methods include result
> in an error, though:
>
> ERROR: type: instantiate_type: expected TypeConstructor, got
>> Type{(Any...,)}
>>  in include at /usr/bin/../lib/julia/sys.so
>>  in process_options at /usr/bin/../lib/julia/sys.so
>>  in _start at /usr/bin/../lib/julia/sys.so (repeats 2 times)
>> while loading /home/scott/.julia/v0.3/Redis/tmp/classes.jl, in expression
>> starting on line 53
>>
>
>

Reply via email to