nope. call(T, 100) does not create a subtype of DenseArray{T}.

The issues Steven mentioned is of great help. Thanks.

On Saturday, October 10, 2015 at 3:44:27 PM UTC+2, Gnimuc Key wrote:
>
> type Foo{T<:AbstractFloat}
>>     x:: DenseArray{T}
>>     Foo() = new(call(T, 100))
>> end
>
>
> do you mean this?
>
> 在 2015年10月10日星期六 UTC+8下午9:36:39,cheng wang写道:
>>
>> I also want to use it to create a new type like the following (just 
>> example, not correct code):
>> type Foo{F<:AbstractFloat, T<DenseArray}
>>     x::T{F}
>>     Foo() = new(call(T, F, 100))
>> end
>>
>> The method you mentioned works for function, but it does not work for 
>> type.
>>
>> On Saturday, October 10, 2015 at 8:30:06 AM UTC+2, Tomas Lycken wrote:
>>>
>>> In the meantime, you can use 
>>>
>>> foo{T<:AbstractFloat}(x::DenseArray{T}) 
>>>
>>> to get what you want. 
>>>
>>> // T
>>>
>>>

Reply via email to