Result Builder is ignored when calling a protocol's static member with dot expression #70649
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
The Result Builder is being ignored when invoking a protocol's static member using dot expression.
Reproduction
Below is the reproduction code. First, the setup:
At this point, the following code should work:
However, when using dot expression as shown below, it results in a compilation error.
The error message is as follows:
It seems that the
@SBuilder
Result Builder specified for thebuilder
parameter in functions
is being ignored and is being treated as a regular closure.Expected behavior
When writing
.s
, it should compile the same way as ifS.s
was written.Environment
macOS: Sonoma 14.1(23B74)
Xcode: 15.2 beta (15C5500c)
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
Additional information
No response
The text was updated successfully, but these errors were encountered: