-
Type:
Bug
-
Status: Closed
-
Priority:
Not Evaluated
-
Resolution: Invalid
-
Affects Version/s: 5.15.2
-
Fix Version/s: None
-
Component/s: QML: Declarative and Javascript Engine
-
Labels:None
-
Platform/s:
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