@@ -50,9 +50,10 @@ typealias F = () -> ()
50
50
typealias F2 = ( ) -> ( ) -> ( )
51
51
typealias F3 = ( ( ) -> ( ) ) -> ( )
52
52
53
- printTypeName ( F . self) // CHECK-NEXT: () -> ()
54
- printTypeName ( F2 . self) // CHECK-NEXT: () -> () -> ()
55
- printTypeName ( F3 . self) // CHECK-NEXT: (() -> ()) -> ()
53
+ printTypeName ( F . self) // CHECK-NEXT: (()) -> ()
54
+ printTypeName ( F2 . self) // CHECK-NEXT: (()) -> (()) -> ()
55
+ printTypeName ( F3 . self) // CHECK-NEXT: (((()) -> ())) -> ()
56
+
56
57
57
58
#if _runtime(_ObjC)
58
59
typealias B = @convention ( block) ( ) -> ( )
@@ -66,11 +67,11 @@ print("@convention(block) () -> ()")
66
67
print ( " () -> @convention(block) () -> () " )
67
68
print ( " (@convention(block) () -> ()) -> () " )
68
69
#endif
69
- // CHECK-NEXT: @convention(block) () -> ()
70
- // CHECK-NEXT: () -> @convention(block) () -> ()
71
- // CHECK-NEXT: (@convention(block) () -> ()) -> ()
70
+ // CHECK-NEXT: @convention(block) (() ) -> ()
71
+ // CHECK-NEXT: (()) -> @convention(block) (() ) -> ()
72
+ // CHECK-NEXT: (( @convention(block) (()) -> () )) -> ()
72
73
73
- printTypeName ( F . Type. self) // CHECK-NEXT: (() -> ()).Type
74
+ printTypeName ( F . Type. self) // CHECK-NEXT: ((() ) -> ()).Type
74
75
printTypeName ( C . Type. self) // CHECK-NEXT: [[THIS]].C.Type
75
76
printTypeName ( C . Type. Type. self) // CHECK-NEXT: [[THIS]].C.Type.Type
76
77
printTypeName ( Any . Type. self) // CHECK-NEXT: protocol<>.Type
@@ -81,24 +82,24 @@ printTypeName((AnyObject?).self) // CHECK-NEXT: {{^}}Swift.Optional<Swift.AnyObj
81
82
82
83
printTypeName ( Void . self) // CHECK-NEXT: ()
83
84
typealias Tup = ( Any , F , C )
84
- printTypeName ( Tup . self) // CHECK-NEXT: (protocol<>, () -> (), [[THIS]].C)
85
+ printTypeName ( Tup . self) // CHECK-NEXT: (protocol<>, (() ) -> (), [[THIS]].C)
85
86
86
- typealias IF = inout Int -> ( )
87
- typealias IF2 = inout Int -> inout Int -> ( )
88
- typealias IF3 = ( inout Int -> ( ) ) -> ( )
89
- typealias IF3a = ( inout ( Int -> ( ) ) ) -> ( )
90
- typealias IF3b = inout ( Int -> ( ) ) -> ( )
87
+ typealias IF = ( inout Int ) -> ( )
88
+ typealias IF2 = ( inout Int ) -> ( inout Int ) -> ( )
89
+ typealias IF3 = ( ( inout Int ) -> ( ) ) -> ( )
90
+ typealias IF3a = ( inout ( ( Int ) -> ( ) ) ) -> ( )
91
+ typealias IF3b = ( inout ( ( Int ) -> ( ) ) ) -> ( )
91
92
typealias IF3c = ( ( inout Int ) -> ( ) ) -> ( )
92
- typealias IF4 = inout ( ( ) -> ( ) ) -> ( )
93
+ typealias IF4 = ( inout ( ( ) -> ( ) ) ) -> ( )
93
94
typealias IF5 = ( inout Int , Any ) -> ( )
94
95
95
- printTypeName ( IF . self) // CHECK-NEXT: inout Swift.Int -> ()
96
- printTypeName ( IF2 . self) // CHECK-NEXT: inout Swift.Int -> inout Swift.Int -> ()
97
- printTypeName ( IF3 . self) // CHECK-NEXT: inout ( Swift.Int -> ()) -> ()
98
- printTypeName ( IF3a . self) // CHECK-NEXT: inout (Swift.Int -> ()) -> ()
99
- printTypeName ( IF3b . self) // CHECK-NEXT: inout (Swift.Int -> ()) -> ()
100
- printTypeName ( IF3c . self) // CHECK-NEXT: (inout Swift.Int -> ()) -> ()
101
- printTypeName ( IF4 . self) // CHECK-NEXT: inout (() -> ()) -> ()
96
+ printTypeName ( IF . self) // CHECK-NEXT: ( inout Swift.Int) -> ()
97
+ printTypeName ( IF2 . self) // CHECK-NEXT: ( inout Swift.Int) -> ( inout Swift.Int) -> ()
98
+ printTypeName ( IF3 . self) // CHECK-NEXT: ((( inout Swift.Int) -> () )) -> ()
99
+ printTypeName ( IF3a . self) // CHECK-NEXT: ( inout (( Swift.Int) -> () )) -> ()
100
+ printTypeName ( IF3b . self) // CHECK-NEXT: ( inout (( Swift.Int) -> () )) -> ()
101
+ printTypeName ( IF3c . self) // CHECK-NEXT: ((( inout Swift.Int) -> () )) -> ()
102
+ printTypeName ( IF4 . self) // CHECK-NEXT: ( inout ((()) -> () )) -> ()
102
103
printTypeName ( IF5 . self) // CHECK-NEXT: (inout Swift.Int, protocol<>) -> ()
103
104
104
105
func curry1( ) {
@@ -125,12 +126,12 @@ func curry3Throws() throws -> () throws -> () {
125
126
return curry1Throws
126
127
}
127
128
128
- printTypeName ( curry1. dynamicType) // CHECK-NEXT: () -> ()
129
+ printTypeName ( curry1. dynamicType) // CHECK-NEXT: (() ) -> ()
129
130
130
- printTypeName ( curry2. dynamicType) // CHECK-NEXT: () -> () -> ()
131
+ printTypeName ( curry2. dynamicType) // CHECK-NEXT: (()) -> (() ) -> ()
131
132
132
- printTypeName ( curry2Throws. dynamicType) // CHECK-NEXT: () throws -> () -> ()
133
+ printTypeName ( curry2Throws. dynamicType) // CHECK-NEXT: (()) throws -> (() ) -> ()
133
134
134
- printTypeName ( curry3. dynamicType) // CHECK-NEXT: () -> () throws -> ()
135
+ printTypeName ( curry3. dynamicType) // CHECK-NEXT: (()) -> (() ) throws -> ()
135
136
136
- printTypeName ( curry3Throws. dynamicType) // CHECK-NEXT: () throws -> () throws -> ()
137
+ printTypeName ( curry3Throws. dynamicType) // CHECK-NEXT: (()) throws -> (() ) throws -> ()
0 commit comments