mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
One is already fixed so let's make sure it won't regress again; the other two are pending some improvements to GenericSignatureBuilder.
39 lines
879 B
Swift
39 lines
879 B
Swift
// RUN: not --crash %target-swift-frontend %s -emit-ir
|
|
// REQUIRES: asserts
|
|
|
|
class PropertyDataSource<O: PropertyHosting> {
|
|
}
|
|
|
|
protocol TableViewCellFactoryType {
|
|
associatedtype Item
|
|
}
|
|
|
|
public protocol PropertyHosting {
|
|
associatedtype PType: Hashable, EntityOwned
|
|
}
|
|
|
|
public protocol EntityOwned: class {
|
|
associatedtype Owner
|
|
}
|
|
|
|
public protocol PropertyType: class {
|
|
}
|
|
|
|
func useType<T>(cellType: T.Type) {
|
|
}
|
|
|
|
final class PropertyTableViewAdapter<Factory: TableViewCellFactoryType>
|
|
where
|
|
Factory.Item: PropertyType,
|
|
Factory.Item.Owner: PropertyHosting,
|
|
Factory.Item.Owner.PType == Factory.Item
|
|
{
|
|
typealias Item = Factory.Item
|
|
|
|
let dataManager: PropertyDataSource<Factory.Item.Owner>
|
|
init(dataManager: PropertyDataSource<Factory.Item.Owner>) {
|
|
useType(cellType: Factory.Item.Owner.self)
|
|
self.dataManager = dataManager
|
|
}
|
|
}
|