Files
swift-mirror/validation-test/compiler_crashers_2/0074-rdar28544316.swift
Slava Pestov 412c71d8c2 Add some crashers
One is already fixed so let's make sure it won't regress again; the
other two are pending some improvements to GenericSignatureBuilder.
2017-02-25 16:17:28 -08:00

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