aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2011-11-29 13:06:47 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-30 12:28:27 +0100
commitdcf1e555d7d2ff435098fe910262cc77dcf835db (patch)
tree294a94c138e3cebe025bd7a3f4abc0be6776cd12 /tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml
parent92b2a05dcae983be6f108e010114c129809b9234 (diff)
Extend the grammar of QML binding declarations.
This allows the use of non-iterative statements on the right hand side of a binding declaration. Change-Id: I60fac880766ba99a410b3647e41b1252677a372f Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml
new file mode 100644
index 0000000000..231aaf0683
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/tryStatement.4.qml
@@ -0,0 +1,12 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property int defaultValue: 123
+
+ function go() {
+ return 321
+ }
+
+ value: try { var p = go() } catch(e) { var p = defaultValue } finally { p == 321 }
+}
+