struct B : RawRepresentable {
     
    let rawValue: Int
     
//  init?(rawValue: Int) {
//
//      self.rawValue = rawValue
//  }
     
    static let c: B = B(rawValue: 0)
    static let d: B = B(rawValue: 1)
}
It seems to me that the memberwise initializer init(rawValue: Int) ignores the 
failable initializer init?(rawValue: Int) from RawRepresentable and is even 
able to satisfy RawRepresentable in that case.



-- 
Adrian Zubarev
Sent with Airmail
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to