Posted it originally in the Using Swift section here:
https://forums.swift.org/t/help-viewbuilder-and-swiftui-issue-swift-5-3/40862
A colleague and I are trying to refactor some code to take advantage of new features in Swift 5.3 and more specifically of the view builder changes that would allow us to remove some of the AnyView casting we were doing.
We noticed that this will not work unless we manually add the @ViewBuilder annotation before of the body property and we thought this would not be needed as it should be treated as a special case and inherit the ViewBuilder was inferred by the compiler ( https://developer.apple.com/wwdc20/10170 1 ): <you can see the pictures in the Swift.org forum thread above>.
Do you see a silly mistake in there?
Thank you in advance for your help!
Kind Regards,
Goffredo