@@ -131,6 +131,7 @@ class Array<T> {
}
public function unshift( x : T ) : Void {
+ if (this.length == 0) this[0] = x;
lua.Table.insert(untyped this, 1, x);
var tmp = this[0];
this[0] = this[1];