Created
November 18, 2021 00:16
-
-
Save ericlewis/83f78f7a422e9fc0651a32360f1e3f1e to your computer and use it in GitHub Desktop.
lol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works. | |
extension VW { | |
public static func buildBlock<Content: DynamicViewContent>(_ content: Content) -> some View where Content.Data: RandomAccessCollection, Content.Data.Element: Identifiable { | |
ViewBuilder.buildBlock(VStack { ForEach(content.data) { _ in Text("Test") } }) | |
} | |
} | |
// Crashes | |
extension VW { | |
public static func buildBlock<Content: DynamicViewContent>(_ content: Content) -> some View where Content.Data: RandomAccessCollection, Content.Data.Element: Identifiable { | |
ViewBuilder.buildBlock(VStack { ForEach(content.data) { _ in Text("Test") } }) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment