Description of the issue
CodeQL has a parse error when JavaScript code contains a property access expression for the property "await" inside an async function, even though this is perfectly valid JavaScript, which you can confirm with this snippet:
const o = { await: 42 };async function x() {console.log(o.await)};x();
For example this parse error emitted by CodeQL in GitHub Actions:
* src/npm.js#L99C30:30: A parse error occurred: `Can not use 'await' as identifier inside an async function`. Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.
corresponds to this expression:
const results = await pool.await();
Description of the issue
CodeQL has a parse error when JavaScript code contains a property access expression for the property "await" inside an
asyncfunction, even though this is perfectly valid JavaScript, which you can confirm with this snippet:For example this parse error emitted by CodeQL in GitHub Actions:
corresponds to this expression: