mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibJS: Make assignment to CallExpression a syntax error in strict mode
This commit is contained in:
committed by
Andreas Kling
parent
283ee678f7
commit
f4d0babd5d
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user