mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibJS: Make assignment to CallExpression a syntax error in strict mode
This commit is contained in:
parent
283ee678f7
commit
f4d0babd5d
Notes:
sideshowbarker
2024-07-19 02:02:44 +09:00
Author: https://github.com/linusg
Commit: f4d0babd5d
Pull-request: https://github.com/SerenityOS/serenity/pull/3688
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