By "type parameter" do you mean the "::Array" here?

> x::Array{I,0} = ...


That syntax does not declare the type of x (type inference should take care
of that), it only asserts the type (i.e. a runtime check). So, it seems
redundant when the type is fully specified in the right hand of the
assignment.

On Wed, May 6, 2015 at 7:58 PM, Michael Louwrens <
[email protected]> wrote:

>
>
> On Thursday, 7 May 2015 01:39:44 UTC+2, Isaiah wrote:
>>
>> Context?
>>
>> On Wed, May 6, 2015 at 7:18 PM, Michael Louwrens <
>> [email protected]> wrote:
>>
>>> ERROR: LoadError: TypeError: setfield!: expected Array{
>>> VarLengthIndividual.VarIndividual{G<:EA.AbstractGene,I<:EA.
>>> AbstractInputSet,R<:EA.AbstractResultSet},1},
>>> got Array{VarLengthIndividual.VarIndividual{G<:EA.AbstractGene,I<:EA.
>>> AbstractInputSet,R<:EA.AbstractResultSet},1}
>>>
>>> I am quite confused looking at this. From current master. Same code
>>> works on 0.3
>>>
>>
>>
> If I try and specify the type it breaks for some strange reason. Removing
> the type parameter allows the code to run. The types are the same though
> which makes the error when doing:
> x::Array{I,0} = Array(VarLengthIndividual.VarIndividual{G<:EA.AbstractGene
> ,I<:EA.AbstractInputSet,R<:EA.AbstractResultSet},0)
>
>  Quite strange.
>

Reply via email to