File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
validation-test/IDE/crashers_2_fixed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %swift-ide-test --code-completion --code-completion-token COMPLETE --source-filename %s
2+ // Should not crash
3+
4+ protocol View2 { }
5+
6+ struct Foo {
7+ init ( closure: ( ) -> Void ) { }
8+ func pnReceive( perform action: ( MyResult ) -> Void ) -> some View2 {
9+ fatalError ( )
10+ }
11+ }
12+
13+ struct SomeStruct {
14+ var string : String
15+ }
16+
17+ @resultBuilder public struct ViewBuilder2 {
18+ public static func buildBlock< Content> ( _ content: Content ) -> Content where Content : View2 { fatalError ( ) }
19+ }
20+
21+ @ViewBuilder2 var body : some View2 {
22+ Foo { } . pnReceive ( ) { ( value) in
23+ switch value {
24+ case let . success( #^COMPLETE^#raw, pretty) :
25+ break
26+ }
27+ }
28+ }
29+
30+ enum MyResult {
31+ case success( SomeStruct )
32+ }
You can’t perform that action at this time.
0 commit comments