# Parameterized subtying syntax strangeness

**URL:** <https://discourse.julialang.org/t/parameterized-subtying-syntax-strangeness/66226>\
**Category:** General Usage\
**Tags:** question\
**Created:** [August 11, 2021, 8:27pm UTC](https://discourse.julialang.org/t/parameterized-subtying-syntax-strangeness/66226 "2021-08-11T20:27:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Campolongo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joseph_campolongo/32/24224_2.png) [@Joseph\_Campolongo](https://discourse.julialang.org/u/Joseph_Campolongo)\
**Post date:** [August 11, 2021, 8:27pm UTC](https://discourse.julialang.org/t/parameterized-subtying-syntax-strangeness/66226/1 "2021-08-11T20:27:03Z")

</div>

Given two syntactically different but semantically equal (?) type definitions, one fails with an `invalid subtyping` error, while the other succeeds. Can someone explain why this is happening?

```julia
julia> abstract type F{X} end

julia> struct G{X<:Real} <: F{X} end

julia> struct H{X} <: F{X} where X<:Real end
ERROR: invalid subtyping in definition of H

julia> struct H{Y} <: F{Int} where {Y<:Real} end

```
