Annex E (informative) Additions and Changes That Introduce Incompatibilities with Prior Editions

7.1.3.1: In ECMAScript 2015, ToNumber applied to a String value now recognizes and converts BinaryIntegerLiteral and OctalIntegerLIteral numeric strings. In previous editions such strings were converted to NaN,

6.2.3: In ECMAScript 2015, Function calls are not allowed to return a Reference value.

11.6: In ECMAScript 2015, the valid code points for an IdentifierName are specified in terms of the Unicode properties “ID_Start” and “ID_Continue”. In previous editions, the valid IdentifierName or Identifier code points were specified by enumerating various Unicode code point categories.

11.9.1: In ECMAScript 2015, Automatic Semicolon Insertion adds a semicolon at the end of a do-while statement if the semicolon is missing. This change aligns the specification with the actual behaviour of most existing implementations.

12.2.6.1: In ECMAScript 2015, it is no longer an early error to have duplicate property names in Object Initializers.

12.14.1: In ECMAScript 2015, strict mode code containing an assignment to an immutable binding such as the function name of a FunctionExpression does not produce an early error. Instead it produces a runtime error.

13.5: In ECMAScript 2015, a StatementListItem beginning with the token let followed by the token [ is the start of a LexicalDeclaration. In previous editions such a sequence would be the start of an ExpressionStatement.

13.6.7: In ECMAScript 2015, the normal completion value of an IfStatement is never the value empty. If no Statement part is evaluated or if the evaluated Statement part produces a normal completion whose value is empty, the completion value of the IfStatement is undefined.

13.7: In ECMAScript 2015, if the ( token of a for statement is immediately followed by the token sequence let [ then the let is treated as the start of a LexicalDeclaration. In previous editions such a token sequence would be the start of an Expression.

13.7: In ECMAScript 2015, if the ( token of a for-in statement is immediately followed by the token sequence let [ then the let is treated as the start of a ForDeclaration. In previous editions such a token sequence would be the start of an LeftHandSideExpression.

13.7: Prior to ECMAScript 2015, an initialization expression could appear as part of the VariableDeclaration that precedes the in keyword. The value of that expression was always discarded. In ECMAScript 2015, the ForBind in that same position does not allow the occurrence of such an initializer.

13.7: In ECMAScript 2015, the completion value of an IterationStatement is never the value empty. If the Statement part of an IterationStatement is not evaluated or if the final evaluation of the Statement part produces a completion whose value is empty, the completion value of the IterationStatement is undefined.

13.11.7: In ECMAScript 2015, the normal completion value of a WithStatement is never the value empty. If evaluation of the Statement part of a WithStatement produces a normal completion whose value is empty, the completion value of the WithStatement is undefined.

13.12.11: In ECMAScript 2015, the completion value of a SwitchStatement is never the value empty. If the CaseBlock part of a SwitchStatement produces a completion whose value is empty, the completion value of the SwitchStatement is undefined.

13.15: In ECMAScript 2015, it is an early error for a Catch clause to contained a var declaration for the same Identifier that appears as the Catch clause parameter. In previous editions, such a variable declaration would be instantiated in the enclosing variable environment but the declaration's Initializer value would be assigned to the Catch parameter.

13.15, 18.2.1.2: In ECMAScript 2015, a runtime SyntaxError is thrown if a Catch clause evaluates a non-strict direct eval whose eval code includes a var or FunctionDeclaration declaration that binds the same Identifier that appears as the Catch clause parameter.

13.15.8: In ECMAScript 2015, the completion value of a TryStatement is never the value empty. If the Block part of a TryStatement evaluates to a normal completion whose value is empty, the completion value of the TryStatement is undefined. If the Block part of a TryStatement evaluates to a throw completion and it has a Catch part that evaluates to a normal completion whose value is empty, the completion value of the TryStatement is undefined if there is no Finally clause or if its Finally clause evalulates to an empty normal completion.

14.3.9 In ECMAScript 2015, the function objects that are created as the values of the [[Get]] or [[Set]] attribute of accessor properties in an ObjectLiteral are not constructor functions and they do not have a prototype own property. In the previous edition, they were constructors and had a prototype property.

19.1.2.5: In ECMAScript 2015, if the argument to Object.freeze is not an object it is treated as if it was a non-extensible ordinary object with no own properties. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.6: In ECMAScript 2015, if the argument to Object.getOwnPropertyDescriptor is not an object an attempt is made to coerce the argument using ToObject. If the coercion is successful the result is used in place of the original argument value. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.7: In ECMAScript 2015, if the argument to Object.getOwnPropertyNames is not an object an attempt is made to coerce the argument using ToObject. If the coercion is successful the result is used in place of the original argument value. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.9: In ECMAScript 2015, if the argument to Object.getPrototypeOf is not an object an attempt is made to coerce the argument using ToObject. If the coercion is successful the result is used in place of the original argument value. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.11: In ECMAScript 2015, if the argument to Object.isExtensible is not an object it is treated as if it was a non-extensible ordinary object with no own properties. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.12: In ECMAScript 2015, if the argument to Object.isFrozen is not an object it is treated as if it was a non-extensible ordinary object with no own properties. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.13: In ECMAScript 2015, if the argument to Object.isSealed is not an object it is treated as if it was a non-extensible ordinary object with no own properties. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.14: In ECMAScript 2015, if the argument to Object.keys is not an object an attempt is made to coerce the argument using ToObject. If the coercion is successful the result is used in place of the original argument value. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.15: In ECMAScript 2015, if the argument to Object.preventExtensions is not an object it is treated as if it was a non-extensible ordinary object with no own properties. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.1.2.17: In ECMAScript 2015, if the argument to Object.seal is not an object it is treated as if it was a non-extensible ordinary object with no own properties. In the previous edition, a non-object argument always causes a TypeError to be thrown.

19.2.3.2: In ECMAScript 2015, the [[Prototype]] internal slot of a bound function is set to the [[GetPrototypeOf]] value of its target function. In the previous edition, [[Prototype]] was always set to %FunctionPrototype%.

19.2.4.1: In ECMAScript 2015, the length property of function instances is configurable. In previous editions it was non-configurable.

19.3.3: In ECMAScript 2015, the Boolean prototype object is not a Boolean instance. In previous editions it was a Boolean instance whose Boolean value was false.

19.5.6.2: In ECMAScript 2015, the [[Prototype]] internal slot of a NativeError constructor is the Error constructor. In previous editions it was the Function prototype object.

20.1.3 In ECMAScript 2015, the Number prototype object is not a Number instance. In previous editions it was a Number instance whose number value was +0.

20.3.4 In ECMAScript 2015, the Date prototype object is not a Date instance. In previous editions it was a Date instance whose TimeValue was NaN.

21.1.3.10 In ECMAScript 2015, the String.prototype.localeCompare function must treat Strings that are canonically equivalent according to the Unicode standard as being identical. In previous editions implementations were permitted to ignore canonical equivalence and could instead use a bit-wise comparison.

21.1.3 In ECMAScript 2015, the String prototype object is not a String instance. In previous editions it was a String instance whose String value was the empty string.

21.1.3.22 and 21.1.3.24 In ECMAScript 2015, lowercase/upper conversion processing operates on code points. In previous editions such the conversion processing was only applied to individual code units. The only affected code points are those in the Deseret block of Unicode

21.1.3.25 In ECMAScript 2015, the String.prototype.trim method is defined to recognize white space code points that may exists outside of the Unicode BMP. However, as of Unicode 7 no such code points are defined. In previous editions such code points would not have been recognized as white space.

21.2.3.1 In ECMAScript 2015, If the pattern argument is a RegExp instance and the flags argument is not undefined, a new RegExp instance is created just like pattern except that pattern’s flags are replaced by the argument flags. In previous editions a TypeError exception was thrown when pattern was a RegExp instance and flags was not undefined.

21.2.5 In ECMAScript 2015, the RegExp prototype object is not a RegExp instance. In previous editions it was a RegExp instance whose pattern is the empty string.

21.2.5 In ECMAScript 2015, source, global, ignoreCase, and multiline are accessor properties defined on the RegExp prototype object. In previous editions they were data properties defined on RegExp instances