Files
swift-mirror/test/Serialization/Inputs/inherited-conformance-base.swift
Jordan Rose fab076e2d4 [test] Don't depend on stdlib protocols in inherited-conformance.swift.
The original bug here about not serializing base protocol conformances
is unlikely to return, but I think this still captures the spirit of
the original test: rely on a base protocol conformance without the
model type ever referring to it.

rdar://problem/25125727
2016-04-18 15:44:45 -07:00

17 lines
334 B
Swift

import Lib
// Adopt SimpleProto via ComplexProto.
public struct Counter<T> : ComplexProto {
public var value = 0
public func predecessor() -> Counter {
return Counter(value: value - 1)
}
public func successor() -> Counter {
return Counter(value: value + 1)
}
public init(value: Int) { self.value = value }
}