mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Check accessibility of all build{Partial}Block overloads and
diagnose if none of them are as accessible as type, otherwise
swift interfaces could end up with invalid result builder
declarations when type is public and all builder methods are
internal.
Resolves: rdar://104384604
14 lines
274 B
Swift
14 lines
274 B
Swift
@propertyWrapper
|
|
public struct Wrapper<Value> {
|
|
public var wrappedValue: Value
|
|
|
|
public init(wrappedValue: Value) {
|
|
self.wrappedValue = wrappedValue
|
|
}
|
|
}
|
|
|
|
@resultBuilder
|
|
public struct Builder {
|
|
public static func buildBlock<T>(_ component: T) -> T { component }
|
|
}
|