aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-12-10 22:06:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-11 14:50:32 +0100
commitbac602c454f38ddde01167a3f75cb10ce1cfb876 (patch)
tree9e716db6d26ac6daeebc97c7bd29b37123f68a05 /tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml
parentf96f0083402ef0210192406aaa943b1b5297a584 (diff)
Throw a parse error on octal numbers and escape sequences
This is compliant with EcmaScript 5.1, where octal numbers and escape sequences are an optional and deprecated part of the syntax. Allow leading 0's in qml mode, but interpret the result as decimal. This is also to keep compatibility with existing code. Change-Id: Ic3450ec3dd17966846751ee688a90c65939ba78f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml
new file mode 100644
index 0000000000..471db8708a
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.6.qml
@@ -0,0 +1,9 @@
+
+import QtQuick 2.0
+
+QtObject {
+ function code() {
+ var x = 0x1;
+ }
+}
+