projects
/
platform
/
upstream
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d597083
)
Throw a type error if defaultValue doesn't lead to a primitive type
author
Lars Knoll
<lars.knoll@digia.com>
Wed, 12 Dec 2012 18:06:19 +0000
(19:06 +0100)
committer
Simon Hausmann
<simon.hausmann@digia.com>
Wed, 12 Dec 2012 09:49:41 +0000
(10:49 +0100)
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>
qmljs_runtime.cpp
patch
|
blob
|
history
diff --git
a/qmljs_runtime.cpp
b/qmljs_runtime.cpp
index
4c200b2
..
55258fd
100644
(file)
--- 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();
}