Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.2
-
None
Description
As claimed in the documentation, currently the JS engine is supposed to be compliant with the 7th edition of ECMA-262.
However, as of the 6th edition, one should be able to set default values for function parameters:
function multiply(a, b = 1) { return a * b; } console.log(multiply(5, 2)); // expected output: 10 console.log(multiply(5)); // expected output: 5
Currently we get the following compilation error at the function declaration point:
error: Expected token `)'
This issue might be the cause for QTBUG-89604