mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The following issues no longer reproduce on `main` and had reduced reproducers. Add them to the test suite. - SR-12977 - SR-14691 - SR-15113 - rdar://63063279 - rdar://64227741 - rdar://69813796 - rdar://85609548
32 lines
679 B
Swift
32 lines
679 B
Swift
// RUN: %swift-ide-test --code-completion --code-completion-token COMPLETE --source-filename %s
|
|
|
|
protocol View2 {}
|
|
|
|
struct Foo {
|
|
init() {}
|
|
func pnReceive(perform action: (MyResult) -> Void) -> some View2 {
|
|
fatalError()
|
|
}
|
|
}
|
|
|
|
struct SomeStruct {
|
|
var string: String
|
|
}
|
|
|
|
@resultBuilder public struct ViewBuilder2 {
|
|
public static func buildBlock<Content>(_ content: Content) -> Content where Content : View2 { fatalError() }
|
|
}
|
|
|
|
@ViewBuilder2 var body: some View2 {
|
|
Foo().pnReceive() { (value) in
|
|
switch value {
|
|
case let .success(#^COMPLETE^#raw, pretty):
|
|
break
|
|
}
|
|
}
|
|
}
|
|
|
|
enum MyResult {
|
|
case success(SomeStruct)
|
|
}
|