From 4c72f0f01fb22c6593c63182e9ac8269e818e7f1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 21 Jan 2013 10:57:09 +0100 Subject: [PATCH] Member expressions on non-objects should throw a type error This is covered by the 11.2.3 tests Change-Id: I74ccda815a0d6c4ba1f7eb25ce327cbb3bb30d48 Reviewed-by: Lars Knoll --- qmljs_runtime.cpp | 2 +- tests/TestExpectations | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp index 58e6cdb..40fc075 100644 --- a/qmljs_runtime.cpp +++ b/qmljs_runtime.cpp @@ -736,7 +736,7 @@ Value __qmljs_call_activation_property(ExecutionContext *context, String *name, Value func = context->getProperty(name); Object *o = func.asObject(); if (!o) - context->throwReferenceError(Value::fromString(name)); + context->throwTypeError(); return o->call(context, Value::undefinedValue(), args, argc); } diff --git a/tests/TestExpectations b/tests/TestExpectations index 5d7b573..6b3a232 100644 --- a/tests/TestExpectations +++ b/tests/TestExpectations @@ -89,11 +89,6 @@ S11.2.1_A3_T3 failing S11.2.1_A4_T1 failing S11.2.1_A4_T3 failing 11.2.3-3_3 failing -S11.2.3_A3_T1 failing -S11.2.3_A3_T2 failing -S11.2.3_A3_T3 failing -S11.2.3_A3_T4 failing -S11.2.3_A3_T5 failing 11.3.1-2-1-s failing 11.3.1-2-2-s failing S11.3.1_A2.2_T1 failing @@ -254,8 +249,6 @@ S12.6.2_A8 failing 13.0-8-s failing 13.0-9-s failing S13_A15_T4 failing -S13_A17_T1 failing -S13_A17_T2 failing S13_A3_T1 failing S13_A6_T2 failing 13.1-11-s failing @@ -534,10 +527,6 @@ S15.1.3.2_A5.3 failing 15.2.3.3-4-161 failing 15.2.3.3-4-162 failing 15.2.3.3-4-164 failing -15.2.3.3-4-212 failing -15.2.3.3-4-213 failing -15.2.3.3-4-214 failing -15.2.3.3-4-215 failing 15.2.3.3-4-51 failing 15.2.3.3-4-82 failing 15.2.3.3-4-9 failing -- 2.7.4