From d0a744adea8d213d00f248ac04fb18e5baed53a2 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 26 Nov 2012 10:43:17 +0100 Subject: 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 --- .../qdeclarativelanguage/data/compatibilitySemicolon.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/compatibilitySemicolon.qml (limited to 'tests/auto/declarative/qdeclarativelanguage/data') 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 + } +} -- cgit v1.2.3