diff options
author | Lars Knoll <lars.knoll@digia.com> | 2012-12-10 22:06:33 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-11 14:50:32 +0100 |
commit | bac602c454f38ddde01167a3f75cb10ce1cfb876 (patch) | |
tree | 9e716db6d26ac6daeebc97c7bd29b37123f68a05 /tests/auto/qml/qqmlecmascript/data/numberParsing.2.qml | |
parent | f96f0083402ef0210192406aaa943b1b5297a584 (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.2.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/numberParsing.2.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/numberParsing.2.qml b/tests/auto/qml/qqmlecmascript/data/numberParsing.2.qml new file mode 100644 index 0000000000..77f13178c3 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/numberParsing.2.qml @@ -0,0 +1,9 @@ + +import QtQuick 2.0 + +QtObject { + function code() { + var x = 1.01; + } +} + |