# Tricky "too many parameters for type" error

**URL:** <https://discourse.julialang.org/t/tricky-too-many-parameters-for-type-error/25182>\
**Category:** General Usage\
**Created:** [June 12, 2019, 10:50am UTC](https://discourse.julialang.org/t/tricky-too-many-parameters-for-type-error/25182 "2019-06-12T10:50:41Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dawbarton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dawbarton/32/215461_2.png) [@dawbarton](https://discourse.julialang.org/u/dawbarton)\
**Post date:** [June 13, 2019, 9:07am UTC](https://discourse.julialang.org/t/tricky-too-many-parameters-for-type-error/25182/6 "2019-06-13T09:07:12Z")

</div>

Not quite correct; the info about `A <: AbstractArray` is not lost. Consider the following

```julia
julia> struct Foo{A} ; a::A ; end

julia> const Bar = Foo{A} where A <: AbstractArray # note the where N where T is unnecessary
Foo{A} where A<:AbstractArray

julia> Bar{typeof([1])}([1])
Foo{Array{Int64,1}}([1])

julia> Bar{typeof(1)}(1) # not an AbstractArray
ERROR: TypeError: in Type, in A, expected A<:AbstractArray, got Type{Int64}
Stacktrace:
 [1] top-level scope at none:0

julia> Foo{typeof(1)}(1) # directly with Foo (doesn't have the subtyping relation imposed)
Foo{Int64}(1)

```

Note that `AbstractArray{T,N} where N where T` is equivalent to `AbstractArray` on its own.

---

_[View the full topic](https://discourse.julialang.org/t/tricky-too-many-parameters-for-type-error/25182)._
