فهرست منبع

[php] haxe.Rest.ofNative

Aleksandr Kuzmenko 4 سال پیش
والد
کامیت
b9a17aab83
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      std/php/_std/haxe/Rest.hx

+ 4 - 0
std/php/_std/haxe/Rest.hx

@@ -17,6 +17,10 @@ abstract Rest<T>(NativeRest<T>) {
 	static public inline function of<T>(array:Array<T>):Rest<T>
 	static public inline function of<T>(array:Array<T>):Rest<T>
 		return new Rest(@:privateAccess array.arr);
 		return new Rest(@:privateAccess array.arr);
 
 
+	@:from
+	static inline function ofNative<T>(array:NativeIndexedArray<T>):Rest<T>
+		return new Rest(array);
+
 	inline function new(a:NativeIndexedArray<T>):Void
 	inline function new(a:NativeIndexedArray<T>):Void
 		this = a;
 		this = a;