summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelanguage/data
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-11-26 10:43:17 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-26 23:23:08 +0100
commitd0a744adea8d213d00f248ac04fb18e5baed53a2 (patch)
tree094c9257c34403944c866aff771ba2efeb409639 /tests/auto/declarative/qdeclarativelanguage/data
parent140b883402412f4eade4016f0fedd9b7799660bd (diff)
Accept missing semicolon after do-while statement.
Although not valid according to ECMA 5.1, both JSC and V8 accept a missing semicolon after a do-while loop. (Both JSC and V8 do not do this through automatic semicolon insertion, but handle it as a special case.) This is a "port" of a similair change done in the qtdeclarative module. Change-Id: I417cf18abb75e7040c48894b8f8f68afc41547fe Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage/data')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/compatibilitySemicolon.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/compatibilitySemicolon.qml b/tests/auto/declarative/qdeclarativelanguage/data/compatibilitySemicolon.qml
new file mode 100644
index 00000000..117925e6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/compatibilitySemicolon.qml
@@ -0,0 +1,11 @@
+import QtQuick 1.0
+
+QtObject {
+ function code() {
+
+ // Not correct according to ECMA 5.1, but JSC and V8 accept the following:
+ do {
+ ;
+ } while (false) true
+ }
+}