# Generic type parametrized by supertype

**URL:** https://discourse.julialang.org/t/generic-type-parametrized-by-supertype/56643
**Category:** General Usage
**Tags:** question
**Created:** [March 7, 2021, 1:43am UTC](https://discourse.julialang.org/t/generic-type-parametrized-by-supertype/56643 "2021-03-07T01:43:08Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [March 7, 2021, 1:55am UTC](https://discourse.julialang.org/t/generic-type-parametrized-by-supertype/56643/2 "2021-03-07T01:55:19Z")

</div>

The problem there is that `Int64` is concrete and cannot be subtyped. With `Integer` it should work.

> [@Why is it impossible to subtype a struct?](https://discourse.julialang.org/t/why-is-it-impossible-to-subtype-a-struct/19876/3):
>
> Multiple inheritance is a totally different story and could be allowed. I’ve written about why we don’t allow subtyping of concrete types before if someone wants to dig up one of my earlier posts about it. Edit: here’s a link to an old google groups conversation about it [https://groups.google.com/d/msg/julia-dev/eA4VkFAD-yQ/LNUP\_OT0zy0J](https://groups.google.com/d/msg/julia-dev/eA4VkFAD-yQ/LNUP_OT0zy0J) In particular, this paragraph from the end of my first post on the thread sums up my position fairly well still: While there are a number of practical reaso…

---

_[View the full topic](https://discourse.julialang.org/t/generic-type-parametrized-by-supertype/56643)._
