diff options
author | Lars Knoll <lars.knoll@digia.com> | 2012-12-12 19:06:19 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-12-12 10:49:41 +0100 |
commit | 363a7b57d87b72ffd906dfb437774a3cdb9c3bda (patch) | |
tree | d8346c2bf136ff2756ebbc549337d3ee07291109 /qmljs_runtime.cpp | |
parent | d597083c012274d9a591e0805e2d892393cc9e89 (diff) |
Throw a type error if defaultValue doesn't lead to a primitive type
As specified in 8.12.8, we need to throw a type error if calling
[[defaultValue]] on an object doesn't convert to a primitive
type.
Change-Id: I6b5db91a36a21c6037998efb15646d00d49b5d4c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'qmljs_runtime.cpp')
-rw-r--r-- | qmljs_runtime.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp index 4c200b251f..55258fd06d 100644 --- a/qmljs_runtime.cpp +++ b/qmljs_runtime.cpp @@ -509,6 +509,7 @@ Value __qmljs_object_default_value(ExecutionContext *ctx, Value object, int type return r; } + ctx->throwTypeError(); return Value::undefinedValue(); } |