|
@@ -1,20 +1,21 @@
|
|
package haxe;
|
|
package haxe;
|
|
|
|
|
|
-import haxe.iterators.RestIterator;
|
|
|
|
-import haxe.iterators.RestKeyValueIterator;
|
|
|
|
import cs.NativeArray;
|
|
import cs.NativeArray;
|
|
import cs.system.Array as CsArray;
|
|
import cs.system.Array as CsArray;
|
|
|
|
+import haxe.iterators.RestIterator;
|
|
|
|
+import haxe.iterators.RestKeyValueIterator;
|
|
|
|
|
|
private typedef NativeRest<T> = #if erase_generics NativeArray<Dynamic> #else NativeArray<T> #end;
|
|
private typedef NativeRest<T> = #if erase_generics NativeArray<Dynamic> #else NativeArray<T> #end;
|
|
|
|
|
|
@:coreApi
|
|
@:coreApi
|
|
abstract Rest<T>(NativeRest<T>) {
|
|
abstract Rest<T>(NativeRest<T>) {
|
|
- public var length(get,never):Int;
|
|
|
|
|
|
+ public var length(get, never):Int;
|
|
|
|
+
|
|
inline function get_length():Int
|
|
inline function get_length():Int
|
|
return this.Length;
|
|
return this.Length;
|
|
|
|
|
|
@:from static public inline function of<T>(array:Array<T>):Rest<T>
|
|
@:from static public inline function of<T>(array:Array<T>):Rest<T>
|
|
- return new Rest(@:privateAccess array.__a);
|
|
|
|
|
|
+ return new Rest(cs.Lib.nativeArray(array, false));
|
|
|
|
|
|
inline function new(a:NativeRest<T>):Void
|
|
inline function new(a:NativeRest<T>):Void
|
|
this = a;
|
|
this = a;
|
|
@@ -51,4 +52,4 @@ abstract Rest<T>(NativeRest<T>) {
|
|
public function toString():String {
|
|
public function toString():String {
|
|
return toArray().toString();
|
|
return toArray().toString();
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|