You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if cond, #available(OSX 10.52,*){ // expected-warning{{result builder 'TupleBuilder' does not implement 'buildLimitedAvailability'; this code may crash on earlier versions of the OS}}
80
+
if cond, #available(OSX 10.52,*){
81
+
// expected-warning@-1{{result builder 'TupleBuilder' does not implement 'buildLimitedAvailability'; this code may crash on earlier versions of the OS}}
82
82
cond2
83
83
globalFuncAvailableOn10_52()
84
-
}elseif bool {
84
+
}elseiftrue{
85
+
globalFuncAvailableOn10_52() // expected-error{{'globalFuncAvailableOn10_52()' is only available in macOS 10.52 or newer}}
86
+
// expected-note@-1{{add 'if #available' version check}}
87
+
}elseiffalse{
85
88
globalFuncAvailableOn10_52() // expected-error{{'globalFuncAvailableOn10_52()' is only available in macOS 10.52 or newer}}
86
89
// expected-note@-1{{add 'if #available' version check}}
87
90
}else{
88
91
globalFuncAvailableOn10_52() // expected-error{{'globalFuncAvailableOn10_52()' is only available in macOS 10.52 or newer}}
89
92
// expected-note@-1{{add 'if #available' version check}}
90
93
}
91
-
if cond, #unavailable(OSX 10.52){ // expected-warning{{result builder 'TupleBuilder' does not implement 'buildLimitedAvailability'; this code may crash on earlier versions of the OS}}
94
+
if cond, #unavailable(OSX 10.52){
95
+
// expected-warning@-1{{result builder 'TupleBuilder' does not implement 'buildLimitedAvailability'; this code may crash on earlier versions of the OS}}
92
96
cond2
93
97
globalFuncAvailableOn10_52() // expected-error{{'globalFuncAvailableOn10_52()' is only available in macOS 10.52 or newer}}
94
98
// expected-note@-1{{add 'if #available' version check}}
95
-
}elseif bool {
99
+
}elseiftrue{
100
+
globalFuncAvailableOn10_52()
101
+
}elseiffalse{
96
102
globalFuncAvailableOn10_52()
97
103
}else{
98
104
globalFuncAvailableOn10_52()
@@ -148,21 +154,12 @@ func tuplifyWithAvailabilityErasure<T>(_ cond: Bool, @TupleBuilderAvailability b
148
154
}
149
155
150
156
tuplifyWithAvailabilityErasure(true){ cond in
151
-
varbool=true
152
157
if cond, #available(OSX 10.52,*){
153
158
globalFuncAvailableOn10_52()
154
-
}elseif bool {
155
-
globalFuncAvailableOn10_52() // expected-error{{'globalFuncAvailableOn10_52()' is only available in macOS 10.52 or newer}}
156
-
// expected-note@-1{{add 'if #available' version check}}
157
-
}else{
158
-
globalFuncAvailableOn10_52() // expected-error{{'globalFuncAvailableOn10_52()' is only available in macOS 10.52 or newer}}
159
-
// expected-note@-1{{add 'if #available' version check}}
160
159
}
160
+
161
161
if cond, #unavailable(OSX 10.52){
162
-
globalFuncAvailableOn10_52() // expected-error{{'globalFuncAvailableOn10_52()' is only available in macOS 10.52 or newer}}
163
-
// expected-note@-1{{add 'if #available' version check}}
0 commit comments