I'm a little embarrassed to admit, but I had been blissfully unaware that View extensions are type erasing.
That means if you have an extension for using your ViewModifier in a more ergonomic way, it'll be erased to AnyView unless you explicitly mark it as @inlinable.
Edit: Perhaps this is just a quirk of Xcode Previews: https://mastodon.notsobig.co/@phill/111051676536041177
@mattiem yes quite surprising! Presumably AnyView is introduced by the runtime?
I thought it made sense, but now I’m not sure it does. 😅
@mattiem It looks like it might be a quirk of Xcode Previews, actually https://mastodon.notsobig.co/@phill/111051676536041177
@jasonhowlin indeed an opaque type should preserve type information, but it appears Xcode Previews for whatever reason discards it. 🤷♂️
@phill what if your return ModifiedContent instead?
The home of The Not So Big Company on Mastodon.