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
"Function builders" are being renamed to "result builders". Add the
corresponding `@resultBuilder` attribute, with `@_functionBuilder` as
an alias for it, Update test cases to use @resultBuilder.
Copy file name to clipboardExpand all lines: test/Constraints/function_builder_availability.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ enum Either<T,U> {
7
7
case second(U)
8
8
}
9
9
10
-
@_functionBuilder
10
+
@resultBuilder
11
11
structTupleBuilder{ // expected-note{{add 'buildLimitedAvailability(_:)' to the function builder 'TupleBuilder' to erase type information for less-available types}}{{22-22=\n static func buildLimitedAvailability(_ component: <#Component#>) -> <#Component#> {\n <#code#>\n \}}}
12
12
staticfunc buildBlock<T1>(_ t1:T1)->(T1){
13
13
return(t1)
@@ -77,7 +77,7 @@ tuplify(true) { cond in
77
77
}
78
78
79
79
// Function builder that can perform type erasure for #available.
// expected-note@-1{{add 'buildOptional(_:)' to the function builder 'TupleBuilderWithoutIf' to add support for 'if' statements without an 'else'}}
50
50
// expected-note@-2{{add 'buildEither(first:)' and 'buildEither(second:)' to the function builder 'TupleBuilderWithoutIf' to add support for 'if'-'else' and 'switch'}}
@@ -171,7 +171,7 @@ struct TupleP<U> : P {
171
171
init(_:U){}
172
172
}
173
173
174
-
@_functionBuilder
174
+
@resultBuilder
175
175
structBuilder{
176
176
staticfunc buildBlock<S0, S1>(_ stmt1:S0, _ stmt2:S1) // expected-note {{required by static method 'buildBlock' where 'S1' = 'Label<_>.Type'}}
0 commit comments