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.

gist.github.com/phillipcaudell

Edit: Perhaps this is just a quirk of Xcode Previews: mastodon.notsobig.co/@phill/11

@phill this is extremely surprising. Where is the AnyView even coming from!?

Follow

@mattiem yes quite surprising! Presumably AnyView is introduced by the runtime?

I thought it made sense, but now I’m not sure it does. 😅

Sign in to participate in the conversation
The Not So Big Company

The home of The Not So Big Company on Mastodon.