it should be possible with an inline function with...
# language-proposals
n
it should be possible with an inline function with a reified type parameter