[vala/0.36: 150/212] tests: Add test for parameter type checking of async methods
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36: 150/212] tests: Add test for parameter type checking of async methods
- Date: Sat, 14 Apr 2018 07:55:58 +0000 (UTC)
commit 1a2de591a247adef1c94db9635189e2c0435f8a3
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Jan 18 21:00:29 2018 +0100
tests: Add test for parameter type checking of async methods
https://bugzilla.gnome.org/show_bug.cgi?id=792660
tests/Makefile.am | 1 +
tests/asynchronous/bug792660.vala | 15 +++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index edbef43..8f026c0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -293,6 +293,7 @@ TESTS = \
asynchronous/bug762819.vala \
asynchronous/bug777242.vala \
asynchronous/bug783543.vala \
+ asynchronous/bug792660.vala \
asynchronous/closures.vala \
asynchronous/generator.vala \
asynchronous/yield.vala \
diff --git a/tests/asynchronous/bug792660.vala b/tests/asynchronous/bug792660.vala
new file mode 100644
index 0000000..b5ffddd
--- /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);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]