mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If `buildBlock` is also unavailable, or the builder itself is unavailable, continue to solve using `buildPartialBlock` to get better diagnostics. This behavior technically differs from what is specified in SE-0348, but only affects the invalid case where no builder methods are available to use. In particular, this improves diagnostics for RegexComponentBuilder when the deployment target is too low. Previously we would try to solve using `buildBlock` (as `buildPartialBlock` is unavailable), but RegexComponentBuilder only defines `buildBlock` for the empty body case, leading to unhelpful diagnostics that ultimately preferred not to use the result builder at all. rdar://97533700