Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.12.3
-
None
-
-
1d3d7437ba (qt/qtdeclarative/dev) 1d3d7437ba (qt/tqtc-qtdeclarative/dev) 1d3d7437ba (qt/qtdeclarative/wip/material3) 1d3d7437ba (qt/tqtc-qtdeclarative/wip/material3)
Description
The let-declarations are hoisted even though they should not:
function foo() {
n = 0;
console.log(n); // should give a ReferenceError, but it doesn't
let n;
}
ECMA-262, 7th Edition, ยง13.3.1:
The variables are created when their containing Lexical Environment is instantiated but may not be accessed in any way until the variable's LexicalBinding is evaluated.
Attachments
Issue Links
- relates to
-
QTBUG-104192 Implement generate_InitializeBlockDeadTemporalZone
- Closed