Browse Source

fixed reverse.

Nicolas Cannasse 19 years ago
parent
commit
7ddd034d1d
2 changed files with 2 additions and 3 deletions
  1. 1 1
      std/Array.hx
  2. 1 2
      std/neko/NekoArray__.hx

+ 1 - 1
std/Array.hx

@@ -63,7 +63,7 @@ extern class Array<T> {
 	/**
 		Reverse the order of elements of the Array.
 	**/
-	function reverse() : Array<T>;
+	function reverse() : Void;
 
 	/**
 		Removes the first element and returns it.

+ 1 - 2
std/neko/NekoArray__.hx

@@ -169,7 +169,7 @@ class NekoArray__<T> implements Array<T> {
 		untyped {
 			var i = 0;
 			var l = this.length;
-			var a = __dollar__asub(this.__a,0,l);
+			var a = this.__a;
 			var half = __dollar__int(l / 2);
 			l -= 1;
 			while( i < half ) {
@@ -178,7 +178,6 @@ class NekoArray__<T> implements Array<T> {
 				a[l-i] = tmp;
 				i += 1;
 			}
-			return Array.new1(a,l+1);
 		}
 	}