File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,9 @@ public protocol Integer : ${IntegerBase} {
284
284
/// returns `nil` otherwise.
285
285
init?< T : FloatingPoint> ( exactly source: T)
286
286
287
+ /// Truncates the `source` to the closest representable value of `Self`.
288
+ init< T : FloatingPoint> ( _ source: T)
289
+
287
290
/// Creates an instance of `Self` from the value of any other `Integer`,
288
291
/// trapping if value of `source` cannot be represented by `Self`.
289
292
init < T : Integer> ( _ source: T)
@@ -310,7 +313,6 @@ public protocol Integer : ${IntegerBase} {
310
313
/// If `self` is negative, returns the index of the least significant bit of
311
314
/// our representation such that all more-significant bits are 1.
312
315
/// Has the value -1 if `self` is 0.
313
- /// Has the value equal to `bitWidth - 1` for fixed width integers.
314
316
var signBitIndex : Word { get }
315
317
316
318
% for x in binaryArithmetic [ 'Integer'] :
@@ -336,6 +338,10 @@ extension Integer {
336
338
fatalError ( )
337
339
}
338
340
341
+ public init< T : FloatingPoint> ( _ source: T) {
342
+ fatalError ( )
343
+ }
344
+
339
345
public var countRepresentedWords : Word {
340
346
return ( self . bitWidth + ${ word_bits} - 1 ) / ${ word_bits}
341
347
}
You can’t perform that action at this time.
0 commit comments