@@ -328,7 +328,7 @@ extension UInt32: Initiable {}
328
328
extension UInt64 : Initiable { }
329
329
330
330
/** build bit pattern from array of bits */
331
- @_specialize ( UInt8)
331
+ @_specialize ( where T == UInt8 )
332
332
func integerFrom< T: UnsignedInteger > ( _ bits: Array < Bit > ) -> T {
333
333
var bitPattern : T = 0
334
334
for idx in bits. indices {
@@ -935,12 +935,12 @@ extension String {
935
935
/** array of bytes */
936
936
extension UInt16 {
937
937
938
- @_specialize ( ArraySlice < UInt8 > )
938
+ @_specialize ( where T == ArraySlice< UInt8 > )
939
939
init < T: Collection > ( bytes: T ) where T. Iterator. Element == UInt8 , T. Index == Int {
940
940
self = UInt16 ( bytes: bytes, fromIndex: bytes. startIndex)
941
941
}
942
942
943
- @_specialize( ArraySlice < UInt8 > )
943
+ @_specialize ( where T == ArraySlice< UInt8 > )
944
944
init < T: Collection > ( bytes: T , fromIndex index: T . Index ) where T. Iterator. Element == UInt8 , T. Index == Int {
945
945
let val0 = UInt16 ( bytes [ index. advanced ( by: 0 ) ] ) << 8
946
946
let val1 = UInt16 ( bytes [ index. advanced ( by: 1 ) ] )
@@ -972,12 +972,12 @@ extension UInt32: _UInt32Type {}
972
972
/** array of bytes */
973
973
extension UInt32 {
974
974
975
- @_specialize ( ArraySlice < UInt8 > )
975
+ @_specialize ( where T == ArraySlice< UInt8 > )
976
976
init < T: Collection > ( bytes: T ) where T. Iterator. Element == UInt8 , T. Index == Int {
977
977
self = UInt32 ( bytes: bytes, fromIndex: bytes. startIndex)
978
978
}
979
979
980
- @_specialize( ArraySlice < UInt8 > )
980
+ @_specialize ( where T == ArraySlice< UInt8 > )
981
981
init < T: Collection > ( bytes: T , fromIndex index: T . Index ) where T. Iterator. Element == UInt8 , T. Index == Int {
982
982
let val0 = UInt32 ( bytes [ index. advanced ( by: 0 ) ] ) << 24
983
983
let val1 = UInt32 ( bytes [ index. advanced ( by: 1 ) ] ) << 16
@@ -1002,12 +1002,12 @@ extension UInt32 {
1002
1002
/** array of bytes */
1003
1003
extension UInt64 {
1004
1004
1005
- @_specialize ( ArraySlice < UInt8 > )
1005
+ @_specialize ( where T == ArraySlice< UInt8 > )
1006
1006
init < T: Collection > ( bytes: T ) where T. Iterator. Element == UInt8 , T. Index == Int {
1007
1007
self = UInt64 ( bytes: bytes, fromIndex: bytes. startIndex)
1008
1008
}
1009
1009
1010
- @_specialize( ArraySlice < UInt8 > )
1010
+ @_specialize ( where T == ArraySlice< UInt8 > )
1011
1011
init < T: Collection > ( bytes: T , fromIndex index: T . Index ) where T. Iterator. Element == UInt8 , T. Index == Int {
1012
1012
let val0 = UInt64 ( bytes [ index. advanced ( by: 0 ) ] ) << 56
1013
1013
let val1 = UInt64 ( bytes [ index. advanced ( by: 1 ) ] ) << 48
0 commit comments