archives

« Bugzilla Issues Index

#1939 — 22.2.3.26: Invalid assertion in step 7


22.2.3.26 %TypedArray%.prototype.sort ( comparefn )

This assertion is not valid:
7. Assert: Both Type(x) and Type(y) is Number.

%TypedArray%.prototype.sort is a generic method, when applying it to an object which is not a %TypedArray%, this assertion does not hold.


Most likely other %TypedArray%.prototype functions also need to get a more formalised specification. The handwaving "may be optimized" opens the door for incompatible behaviour across implementations...


No, I intentionally specified these methods as not being generic. That's why they are distinct functions and not just shared reference to the Array.prototype methods.

I added clarifying language and algorithms tweaks throughout 22.2.3

fixed in rev19 editor's draft


Ok, thanks for the clarification!


fixed in rev19