Files
swift-mirror/test/Serialization/Inputs/inherited-conformance-user.swift
Jordan Rose 82b9cf5a75 Re-apply "[test] Rely on the stdlib as little as possible."
Correctly, this time.

Swift SVN r25299
2015-02-14 18:57:46 +00:00

29 lines
630 B
Swift

import Base
// Instantiate Counter<Int>, relying on Counter's adoption of ForwardIndexType.
public struct OneToAThousand : CollectionType {
public typealias Element = Int
public typealias Index = Counter<Int>
public var startIndex: Index {
return Index(value: 1)
}
public var endIndex: Index {
return Index(value: 1001)
}
public subscript(i: Index) -> Element {
return i.value
}
public func generate() -> IndexingGenerator<OneToAThousand> {
return IndexingGenerator(self)
}
public init() {}
}
public protocol SpecialProto : IntegerLiteralConvertible {}
extension Int : SpecialProto {}