Hi,

I’m don’t know how to get the compiler to recognise a type `K{T}`

where K could be any type. For example:

```
abstract type AbstractGeneric{T} end
#... after defining further types <: AbstractGeneric{T} for example ... #
struct MyType{T} <: AbstractGeneric{T}
x::T
end
function myMethod(x::MyType{T}) where {T}
return 2*x.x
end
# Baby example
function fun(x::K{T}, z::AbstractArray{T}) where {K <: AbstractGeneric, T <: AbstractFloat}
return sum((myMethod(x) .- z)^2)
end
```

I specifically want to constrain `K{T}`

with `AbstractArray{T}`

on `T`

. The compiler gives me the error:

```
ERROR: TypeError: in Type{...} expression, expected UnionAll, got TypeVar
```

I know that it will compile with:

```
function fun(x::AbstractGeneric{T}, z::AbstractArray{T}) where {T <: AbstractFloat}
return sum((myMethod(x) .- z)^2)
end
```

But that’s runtime dispatch on `myMethod()`

which I don’t want.

Thanks