|
| 1 | +// RUN: %swift -swift-version 4 -typecheck -verify %s |
| 2 | + |
| 3 | +struct MyInt: FixedWidthInteger { // expected-error {{type 'MyInt' does not conform to protocol 'BinaryInteger'}} |
| 4 | + typealias IntegerLiteralType = Int |
| 5 | + static let isSigned = false |
| 6 | + init(integerLiteral value: Int) { fatalError() } |
| 7 | + init(_truncatingBits bits: UInt) { fatalError() } |
| 8 | + init<T : BinaryFloatingPoint>(_ source: T) { fatalError() } |
| 9 | + init?<T : BinaryFloatingPoint>(exactly source: T) { fatalError() } |
| 10 | + init<T : BinaryInteger>(_ source: T) { fatalError() } |
| 11 | + init?<T : BinaryInteger>(exactly source: T) { fatalError() } |
| 12 | + init<T : BinaryInteger>(truncatingIfNeeded source: T) { fatalError() } |
| 13 | + init<T : BinaryInteger>(clamping source: T) { fatalError() } |
| 14 | + |
| 15 | + let words = [UInt]() |
| 16 | + let _lowWord: UInt = 0 |
| 17 | + static var bitWidth: Int { fatalError() } |
| 18 | + var trailingZeroBitCount: Int { fatalError() } |
| 19 | + |
| 20 | + static func /=(_ lhs: inout MyInt, _ rhs: MyInt) { fatalError() } |
| 21 | + static func /(_ lhs: MyInt, _ rhs: MyInt) -> MyInt { fatalError() } |
| 22 | + static func %=(_ lhs: inout MyInt, _ rhs: MyInt) { fatalError() } |
| 23 | + static func %(_ lhs: MyInt, _ rhs: MyInt) -> MyInt { fatalError() } |
| 24 | + static func +=(_ lhs: inout MyInt, _ rhs: MyInt) { fatalError() } |
| 25 | + static func +(_ lhs: MyInt, _ rhs: MyInt) -> MyInt { fatalError() } |
| 26 | + static func -=(_ lhs: inout MyInt, _ rhs: MyInt) { fatalError() } |
| 27 | + static func -(_ lhs: MyInt, _ rhs: MyInt) -> MyInt { fatalError() } |
| 28 | + static func *=(_ lhs: inout MyInt, _ rhs: MyInt) { fatalError() } |
| 29 | + static func *(_ lhs: MyInt, _ rhs: MyInt) -> MyInt { fatalError() } |
| 30 | + |
| 31 | + static func ==(_ lhs: MyInt, _ rhs: MyInt) -> Bool { fatalError() } |
| 32 | + static func <(_ lhs: MyInt, _ rhs: MyInt) -> Bool { fatalError() } |
| 33 | + |
| 34 | + static prefix func ~ (_ x: MyInt) -> MyInt { fatalError() } |
| 35 | + |
| 36 | + static func >><RHS: BinaryInteger>(_ lhs: MyInt, _ rhs: RHS) -> MyInt { fatalError() } |
| 37 | + |
| 38 | + static func >>=<RHS: BinaryInteger>(_ lhs: inout MyInt, _ rhs: RHS) { fatalError() } |
| 39 | + static func <<<RHS: BinaryInteger>(_ lhs: MyInt, _ rhs: RHS) -> MyInt { fatalError() } |
| 40 | + static func <<=<RHS: BinaryInteger>(_ lhs: inout MyInt, _ rhs: RHS) { fatalError() } |
| 41 | + |
| 42 | + func quotientAndRemainder(dividingBy rhs: MyInt) -> (quotient: MyInt, remainder: MyInt) { fatalError() } |
| 43 | + func signum() -> MyInt { fatalError() } |
| 44 | + |
| 45 | + var hashValue: Int { fatalError() } |
| 46 | + var byteSwapped: MyInt { fatalError() } |
| 47 | + static var max: MyInt { fatalError() } |
| 48 | + static var min: MyInt { fatalError() } |
| 49 | + func addingReportingOverflow(_ rhs: MyInt) -> (partialValue: MyInt, overflow: Bool) { fatalError() } |
| 50 | + func subtractingReportingOverflow(_ rhs: MyInt) -> (partialValue: MyInt, overflow: Bool) { fatalError() } |
| 51 | + func multipliedReportingOverflow(by rhs: MyInt) -> (partialValue: MyInt, overflow: Bool) { fatalError() } |
| 52 | + func dividedReportingOverflow(by rhs: MyInt) -> (partialValue: MyInt, overflow: Bool) { fatalError() } |
| 53 | + func remainderReportingOverflow(dividingBy rhs: MyInt) -> (partialValue: MyInt, overflow: Bool) { fatalError() } |
| 54 | + func multipliedFullWidth(by other: MyInt) -> (high: MyInt, low: Magnitude) { fatalError() } |
| 55 | + func dividingFullWidth(_ dividend: (high: MyInt, low: Magnitude)) -> (quotient: MyInt, remainder: MyInt) { fatalError() } |
| 56 | + |
| 57 | + var nonzeroBitCount: Int { fatalError() } |
| 58 | + var leadingZeroBitCount: Int { fatalError() } |
| 59 | + |
| 60 | + var magnitude: UInt { fatalError() } |
| 61 | +} |
0 commit comments