]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add test for parameter type checking of async methods
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 18 Jan 2018 20:00:29 +0000 (21:00 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 19 Jan 2018 08:38:26 +0000 (09:38 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=792660

tests/Makefile.am
tests/asynchronous/bug792660.vala [new file with mode: 0644]

index 0391a45dc02aad17ae488a2551fe1ab91387fb31..e1d3526a1d4de78e71baf792bce000bad82d7a99 100644 (file)
@@ -235,6 +235,7 @@ TESTS = \
        asynchronous/bug741929.vala \
        asynchronous/bug742621.vala \
        asynchronous/bug762819.vala \
+       asynchronous/bug792660.vala \
        asynchronous/closures.vala \
        dbus/basic-types.test \
        dbus/arrays.test \
diff --git a/tests/asynchronous/bug792660.vala b/tests/asynchronous/bug792660.vala
new file mode 100644 (file)
index 0000000..b5ffddd
--- /dev/null
@@ -0,0 +1,15 @@
+abstract class Foo {
+       public abstract async void foo ([CCode (array_length = false)] string[] a, int i);
+}
+
+class Bar : Foo {
+       public override async void foo (string[] a, int i) {
+               assert (i == 42);
+       }
+}
+
+void main () {
+       string[] a = { "foo", "bar" };
+       var bar = new Bar ();
+       bar.foo.begin (a, 42);
+}