Files
swift-mirror/test/Sema/Inputs/implementation-only-import-in-decls-helper.swift
Artem Chikin efdfceeb9b [Sema] Diagnose use of implementation-only property wrappers
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
2020-04-10 11:19:42 -07:00

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 {}