# Promote field of abstract type

**URL:** <https://discourse.julialang.org/t/promote-field-of-abstract-type/61732>\
**Category:** General Usage\
**Created:** [May 24, 2021, 4:34pm UTC](https://discourse.julialang.org/t/promote-field-of-abstract-type/61732 "2021-05-24T16:34:25Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![disberd](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@disberd](https://discourse.julialang.org/u/disberd)\
**Post date:** [May 24, 2021, 8:46pm UTC](https://discourse.julialang.org/t/promote-field-of-abstract-type/61732/6 "2021-05-24T20:46:37Z")

</div>

I think that based on the discussion in this post:

> [@Extract type name only from parametric type](https://discourse.julialang.org/t/extract-type-name-only-from-parametric-type/14188/19):
>
> Just in case I was not clear, I meant to use .wrapper and adapt the code from Jameson’s comment as follows: name(::Type{T}) where {T} = (isempty(T.parameters) ? T : T.name.wrapper) Sorry should have been more clear.

you might achieve what you want by defining the strip function parametrically like this:

```julia
strip(::T) where {T} = (isempty(T.parameters) ? T : T.name.wrapper)

```

---

_[View the full topic](https://discourse.julialang.org/t/promote-field-of-abstract-type/61732)._
