@phill @groue Wrapping the modifier in an extension method? Yes that is super common (and a little boolerplate-y, maybe calls for a macro?)

Follow

@helge @groue view extensions for modifiers are super common yes, but I have not seen their type erasure talked about before mastodon.notsobig.co/@phill/11

Edit: Macro is a neat idea, though.

· Edited · · Ivory for Mac · 2 · 0 · 0

@phill @helge Me neither 😅 When I run the gist your linked above (Xcode 15 beta 8), I get three identical "ContainerView<ModifiedContent<Text, MyModifier>>: @‍ self changed." messages: no erasure to AnyView. How to reproduce?

@groue @phill Presumably it has to be in different modules (otherwise the inlinable should have no effect?)

@helge @groue You're right that this is a Swift Package. Specifically, running from an Xcode Preview. Linking and running from simulator yields the 3 identical results. How curious!

@phill @groue Oh I see, that is weird indeed, I wonder what’s going on there 🤔

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

The home of The Not So Big Company on Mastodon.