mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibJS: Make assignment to CallExpression a syntax error in strict mode
This commit is contained in:
parent
283ee678f7
commit
f4d0babd5d
2 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,10 @@ test("assignment to function call", () => {
|
|||
}).toThrowWithMessage(ReferenceError, "Invalid left-hand side in assignment");
|
||||
});
|
||||
|
||||
test("assignment to function call in strict mode", () => {
|
||||
expect("'use strict'; foo() = 'foo'").not.toEval();
|
||||
});
|
||||
|
||||
test("assignment to inline function call", () => {
|
||||
expect(() => {
|
||||
(function () {})() = "foo";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue