mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
"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.
14 lines
267 B
Swift
14 lines
267 B
Swift
@propertyWrapper
|
|
public struct Wrapper<Value> {
|
|
public var wrappedValue: Value
|
|
|
|
public init(wrappedValue: Value) {
|
|
self.wrappedValue = wrappedValue
|
|
}
|
|
}
|
|
|
|
@resultBuilder
|
|
public struct Builder {
|
|
static func buildBlock<T>(_ component: T) -> T { component }
|
|
}
|