Promote field of abstract type

I think that based on the discussion in this post:

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

strip(::T) where {T} = (isempty(T.parameters) ? T : T.name.wrapper)
1 Like