File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -884,16 +884,17 @@ public struct ${Self}<Element>
884
884
885
885
/// Initialization from an existing buffer does not have "array.init"
886
886
/// semantics because the caller may retain an alias to buffer.
887
- public init ( _buffer: _Buffer ) {
887
+ public // @testable
888
+ init ( _buffer: _Buffer ) {
888
889
self . _buffer = _buffer
889
890
}
890
891
891
892
% if Self == 'ArraySlice':
892
- // FIXME(ABI): SR-1873 this shim allows the below init(arrayLiteral:) to
893
- // compile, but it goes through a general collection initializer instead of
894
- // the expected efficient one for _SliceBuffer<Element> above.
895
- public init ( _buffer: _ContiguousArrayBuffer < Element > ) {
896
- self . init ( _buffer)
893
+ /// Initialization from an existing buffer does not have "array.init"
894
+ /// semantics because the caller may retain an alias to buffer.
895
+ public // @testable
896
+ init ( _buffer: _ContiguousArrayBuffer < Element > ) {
897
+ self . init ( _buffer: _Buffer ( _buffer , shiftedToStartIndex : 0 ) )
897
898
}
898
899
% end
899
900
You can’t perform that action at this time.
0 commit comments