# What is wrong with my subtyping?

**URL:** <https://discourse.julialang.org/t/what-is-wrong-with-my-subtyping/12049>\
**Category:** General Usage\
**Created:** [June 28, 2018, 10:47pm UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-subtyping/12049 "2018-06-28T22:47:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qiyamah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qiyamah/32/2660_2.png) [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Post date:** [June 28, 2018, 10:47pm UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-subtyping/12049/1 "2018-06-28T22:47:36Z")

</div>

```nohighlight
julia> abstract type Code{T<:Tuple} end

julia> abstract type Data{T<:Code} <: Code end
ERROR: invalid subtyping in definition of Data

```

Thanks

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [June 29, 2018, 12:12am UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-subtyping/12049/2 "2018-06-29T00:12:40Z")

</div>

`Code` isn’t a type you can subtype from. `Code{Tuple{}}` or something like `Code{T}` would be. All the type parameters in the parent type must be specified.
