Delete on a function argument should return false
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 24 Jan 2013 15:07:18 +0000 (16:07 +0100)
committerLars Knoll <lars.knoll@digia.com>
Thu, 24 Jan 2013 15:59:58 +0000 (16:59 +0100)
Change-Id: I36aafcfa43bced2b8315af39432cf7731daaf458
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qv4codegen.cpp
tests/TestExpectations

index 0552616..60247ac 100644 (file)
@@ -1303,7 +1303,7 @@ bool Codegen::visit(DeleteExpression *ast)
         if (_function->isStrict)
             throwSyntaxError(ast->deleteToken, "Delete of an unqualified identifier in strict mode.");
         // can't delete an argument, just evaluate expr for side effects
-        _expr.accept(nx);
+        _expr.code = _block->CONST(IR::BoolType, 0);
         return false;
     }
     if (_function->isStrict && (*expr)->asName())
index b90a9f1..3732536 100644 (file)
@@ -40,7 +40,6 @@ S11.3.2_A4_T4 failing
 11.4.1-2-5 failing
 11.4.1-2-6 failing
 11.4.1-4.a-5 failing
-11.4.1-5-2 failing
 S11.4.1_A1 failing
 S11.4.1_A2.1 failing
 S11.5.3_A4_T2 failing