Refactor slices for better compliance (#430)

This commit is contained in:
Max Graey
2019-02-27 22:51:07 +02:00
committed by Daniel Wirtz
parent aad263e670
commit cdf40578b6
7 changed files with 51 additions and 55 deletions

View File

@ -344,7 +344,7 @@ export class Array<T> {
var len = this.length_;
begin = begin < 0 ? max(begin + len, 0) : min(begin, len);
end = end < 0 ? max(end + len, 0) : min(end, len);
len = end - begin;
len = max(end - begin, 0);
var sliced = new Array<T>(len);
if (len) {
memory.copy(