File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed
SwiftCompilerSources/Sources Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -178,3 +178,21 @@ extension BridgedArrayRef {
178178 return c ( buffer)
179179 }
180180}
181+
182+ //===----------------------------------------------------------------------===//
183+ // Sequence Utilities
184+ //===----------------------------------------------------------------------===//
185+
186+ /// RandomAccessCollection which bridges to some C++ array.
187+ ///
188+ /// It fixes the default reflection for bridged random access collections, which usually have a
189+ /// `bridged` stored property.
190+ /// Conforming to this protocol displays the "real" children not just `bridged`.
191+ public protocol BridgedRandomAccessCollection : RandomAccessCollection , CustomReflectable {
192+ }
193+
194+ extension BridgedRandomAccessCollection {
195+ public var customMirror : Mirror {
196+ Mirror ( self , children: self . map { ( label: nil , value: $0 as Any ) } )
197+ }
198+ }
Original file line number Diff line number Diff line change @@ -61,20 +61,6 @@ extension FormattedLikeArray {
6161 }
6262}
6363
64- /// RandomAccessCollection which bridges to some C++ array.
65- ///
66- /// It fixes the default reflection for bridged random access collections, which usually have a
67- /// `bridged` stored property.
68- /// Conforming to this protocol displays the "real" children not just `bridged`.
69- public protocol BridgedRandomAccessCollection : RandomAccessCollection , CustomReflectable {
70- }
71-
72- extension BridgedRandomAccessCollection {
73- public var customMirror : Mirror {
74- Mirror ( self , children: self . map { ( label: nil , value: $0 as Any ) } )
75- }
76- }
77-
7864/// A Sequence which is not consuming and therefore behaves like a Collection.
7965///
8066/// Many sequences in SIL and the optimizer should be collections but cannot
You can’t perform that action at this time.
0 commit comments