Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
Qt Creator 4.9.1
Description
As per 15.4.1 in ECMA-262 edition 5.1 you can use Array as a function to create and initialize a new Array object. However, Qt Creator has a false negative warning against the usage. In spite of the warning, the Javascript runs correctly. Please refer https://www.ecma-international.org/ecma-262/5.1/#sec-15.4.1
var indexes = Array(10,1,3,3);
console.log(indexes[2])
QtCreator warning: Calls of functions that start with an uppercase letter should use 'new'. (M306)
Attachments
For Gerrit Dashboard: QTCREATORBUG-22599 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
265921,2 | QmlJS: Add "Array" to global functions | 4.10 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
283874,2 | QmlJS: Add "Symbol, Object, Function, RegExp" to global functions | 4.11 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |