File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,20 @@ public struct Array<T>
191191 return [ T] ( list)
192192 }
193193
194+ #if ISLAND && DARWIN
195+ public static func __implicit( _ array: NSArray < T > ) -> [ T ] {
196+ return List < T > ( array)
197+ }
198+
199+ public static func __implicit( _ array: [ T ] ) -> NSArray < T > {
200+ return array. list. ToNSArray ( )
201+ }
202+
203+ public static func __implicit( _ list: [ T ] ) -> NSMutableArray < T > {
204+ return list. list. ToNSMutableArray ( )
205+ }
206+ #endif
207+
194208 #if COCOA
195209 public static func __implicit( _ list: PlatformImmutableList < T > ) -> [ T ] {
196210 return [ T] ( list)
Original file line number Diff line number Diff line change @@ -24,6 +24,17 @@ public extension ISequence /*: ICustomDebugStringConvertible*/ { // 74092: Silve
2424 return array as! ISequence < T > // 74041: Silver: warning for "as" cast that should be known safe
2525 }
2626
27+ public func ToSwiftArray( ) -> [ T ] {
28+ if let array = self as? [ T ] {
29+ return array. platformList
30+ }
31+ var result = [ T] ( )
32+ for i in self {
33+ result. append ( i)
34+ }
35+ return result
36+ }
37+
2738 public var count : Int {
2839 return self . Count ( )
2940 }
You can’t perform that action at this time.
0 commit comments