From: Rico Tzschichholz Date: Thu, 18 Jan 2018 20:00:29 +0000 (+0100) Subject: tests: Add test for parameter type checking of async methods X-Git-Tag: 0.34.14~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eba4e21990e5aa0b9e4aee4751f4756356a4f95a;p=thirdparty%2Fvala.git tests: Add test for parameter type checking of async methods https://bugzilla.gnome.org/show_bug.cgi?id=792660 --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 0391a45dc..e1d3526a1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 index 000000000..b5ffdddef --- /dev/null +++ b/tests/asynchronous/bug792660.vala @@ -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); +}