aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/methodTypeMismatch.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/methodTypeMismatch.qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/methodTypeMismatch.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/methodTypeMismatch.qml b/tests/auto/qml/qqmlecmascript/data/methodTypeMismatch.qml
new file mode 100644
index 0000000000..fdf5f4ea11
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/methodTypeMismatch.qml
@@ -0,0 +1,25 @@
+import QtQuick 2.0
+
+Item {
+ id: self
+ property font myFont
+ property int notMyFont
+
+ property var object
+
+ function callWithFont() {
+ object.method_gadget(myFont) // should be fine
+ }
+ function callWithInt() {
+ object.method_gadget(123)
+ }
+ function callWithInt2() {
+ object.method_gadget(notMyFont)
+ }
+ function callWithNull() {
+ object.method_gadget(null)
+ }
+ function callWithAllowedNull() {
+ object.method_qobject(null)
+ }
+}