File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1
1
2
- // RUN: %target-swift-emit-silgen -module-name auto_closures -enable-sil-ownership -parse-stdlib %s | %FileCheck %s
2
+ // RUN: %target-swift-emit-silgen -module-name auto_closures -enable-sil-ownership -parse-stdlib -swift-version 5 %s | %FileCheck %s
3
3
4
4
struct Bool { }
5
5
var false_ = Bool ( )
Original file line number Diff line number Diff line change
1
+
2
+ // RUN: %target-swift-emit-silgen -module-name auto_closures -enable-sil-ownership -parse-stdlib -swift-version 4 %s
3
+
4
+ // Swift 4-style autoclosure forwarding should not crash - rdar://problem/44657505
5
+
6
+ public struct Empty { }
7
+
8
+ public func x( _: @autoclosure ( ) -> Empty ) { }
9
+
10
+ public func y1( _ message: @autoclosure ( ) -> Empty ) {
11
+ x ( message)
12
+ }
13
+
14
+ public func y2( _ message: @autoclosure @escaping ( ) -> Empty ) {
15
+ x ( message)
16
+ }
You can’t perform that action at this time.
0 commit comments