Summary
After the Test262 update in #23451, parser_test262.snap shows 63 new failing negative tests. These cases expect SyntaxError for new <ImportCall>.prop, but Oxc currently accepts them.
Examples:
new import('').prop
new import.source('<module source>').prop
new import.defer('./empty_FIXTURE.js').prop
Test262’s rationale is that ImportCall is a CallExpression, not a NewExpression. Property access on an ImportCall remains in the CallExpression grammar, so it cannot be used as the operand of new NewExpression.
Snapshot Evidence
From tasks/coverage/snapshots/parser_test262.snap in #23451:
commit: 05bb0329 -> de8e621c
Negative Passed: 4588/4588 (100.00%) -> 4588/4651 (98.65%)
The added failures are under:
tasks/coverage/test262/test/language/expressions/dynamic-import/syntax/invalid/*-no-new-call-expression-prop-access.js
References
Summary
After the Test262 update in #23451,
parser_test262.snapshows 63 new failing negative tests. These cases expect SyntaxError fornew <ImportCall>.prop, but Oxc currently accepts them.Examples:
Test262’s rationale is that
ImportCallis aCallExpression, not aNewExpression. Property access on anImportCallremains in theCallExpressiongrammar, so it cannot be used as the operand ofnew NewExpression.Snapshot Evidence
From
tasks/coverage/snapshots/parser_test262.snapin #23451:The added failures are under:
References