mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We already ban all structs from declaring storage that comes from implementation-only imports. Until now we missed property wrappers, they were just dropped in deserialization. Resolves rdar://problem/59403617
30 lines
617 B
Swift
30 lines
617 B
Swift
import NormalLibrary
|
|
|
|
extension NormalStruct: NormalProto {
|
|
public typealias Assoc = Int
|
|
}
|
|
extension GenericStruct: NormalProto {
|
|
public typealias Assoc = Int
|
|
}
|
|
extension NormalClass: NormalProto {
|
|
public typealias Assoc = Int
|
|
}
|
|
|
|
public struct BadStruct {}
|
|
public protocol BadProto {}
|
|
open class BadClass {}
|
|
|
|
public struct IntLike: ExpressibleByIntegerLiteral, Equatable {
|
|
public init(integerLiteral: Int) {}
|
|
}
|
|
|
|
@propertyWrapper
|
|
public struct BadWrapper {
|
|
public var wrappedValue: Int
|
|
public init(wrappedValue: Int) {
|
|
self.wrappedValue = wrappedValue
|
|
}
|
|
}
|
|
|
|
precedencegroup BadPrecedence {}
|