# Cannot use parametric type within function body

**URL:** <https://discourse.julialang.org/t/cannot-use-parametric-type-within-function-body/28224>\
**Category:** New to Julia\
**Tags:** parametric-types\
**Created:** [August 30, 2019, 11:36pm UTC](https://discourse.julialang.org/t/cannot-use-parametric-type-within-function-body/28224 "2019-08-30T23:36:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [August 31, 2019, 12:14am UTC](https://discourse.julialang.org/t/cannot-use-parametric-type-within-function-body/28224/2 "2019-08-31T00:14:22Z")

</div>

To be a full mwe you should add `using LinearAlgebra` and define a test Vector of Symmetric matrix, so we don’t all have to do that.

But without testing it, you probably need another `<:`

```julia
function alt(x::Vector{<:Symmetric{T}}) where {T <: Real}
    return T
end

```

---

_[View the full topic](https://discourse.julialang.org/t/cannot-use-parametric-type-within-function-body/28224)._
