File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,13 @@ public extension Swift.Array : java.util.List<T> {
99 public func contains( _ arg1: Object ! ) -> Bool {
1010 return list. contains ( arg1)
1111 }
12+ @inline ( __always)
1213 public func toArray< T> ( _ arg1: T ! [ ] ) -> T ! [ ] {
13- return list . toArray< T> ( arg1)
14+ return platformList . toArray< T> ( arg1)
1415 }
16+ @inline ( __always)
1517 public func toArray( ) -> Object ! [ ] {
16- return list . toArray ( )
18+ return platformList . toArray ( )
1719 }
1820 mutating func add( _ arg1: Int32 , _ arg2: T ! ) {
1921 makeUnique ( )
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public struct Array<T>
9292 public init ( repeating value: T , count: Int ) {
9393 if count == 0 {
9494 list = PlatformList < T > ( )
95- } else {
95+ } else {
9696 #if JAVA
9797 list = PlatformList < T > ( count)
9898 for i in 0 ..< count {
@@ -181,10 +181,12 @@ public struct Array<T>
181181 public static func __implicit( _ array: T [ ] ) -> [ T ] {
182182 return [ T] ( arrayLiteral: array)
183183 }
184-
184+ // In Coope
185+ #if !COOPER
185186 public static func __implicit( _ array: [ T ] ) -> T [ ] {
186187 return array. nativeArray
187188 }
189+ #endif
188190
189191 // Cast from/to platform type
190192
You can’t perform that action at this time.
0 commit comments