blob: 0c0c6bc954c31b202b1fc6aa7dacb1469f9fd0fe [file] [log] [blame]
// RUN: %target-swift-frontend %s -emit-ir -swift-version 3
enum Value {
case IntValue(Int)
}
protocol Storable {
associatedtype Representation
static var storageKey : String? { get }
var representation : Representation { get }
}
protocol RawProducable {
var rawValueForType : Int16 { get }
init<T: Storable where T.Representation == Self>(value: T)
}
extension Int : Storable {
static var storageKey : String? { return "int64Value" }
var representation : Value { return Value.IntValue(self) }
}