mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
26 lines
618 B
Swift
26 lines
618 B
Swift
// RUN: %target-swift-frontend -emit-ir -primary-file %s
|
|
|
|
// https://github.com/apple/swift/issues/46671
|
|
|
|
class UITableViewCell {}
|
|
class UITableView {}
|
|
|
|
extension UITableViewCell: ReusableViewProtocol {
|
|
public typealias ParentView = UITableView
|
|
}
|
|
|
|
protocol ReusableViewProtocol {
|
|
associatedtype ParentView
|
|
}
|
|
|
|
protocol ReusableViewFactoryProtocol {
|
|
associatedtype View: ReusableViewProtocol
|
|
func configure(parentView: View.ParentView)
|
|
}
|
|
|
|
extension ReusableViewFactoryProtocol where View: UITableViewCell {
|
|
func tableCellFor(tableView: UITableView) {
|
|
configure(parentView: tableView)
|
|
}
|
|
}
|