[vala/0.36] tests: Add "method override with compatible delegate parameter" test
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36] tests: Add "method override with compatible delegate parameter" test
- Date: Sun, 28 Oct 2018 11:46:43 +0000 (UTC)
commit 9a24b85f2b0c350489656e2aaecb542c1168b013
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Oct 19 15:58:11 2018 +0200
tests: Add "method override with compatible delegate parameter" test
tests/Makefile.am | 1 +
tests/delegates/compatible.vala | 14 ++++++++++++++
2 files changed, 15 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a943ce161..1889f2743 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -175,6 +175,7 @@ TESTS = \
structs/bug775761.vala \
structs/bug777194.vala \
delegates/casting.vala \
+ delegates/compatible.vala \
delegates/delegates.vala \
delegates/fields.vala \
delegates/fields-no-target.vala \
diff --git a/tests/delegates/compatible.vala b/tests/delegates/compatible.vala
new file mode 100644
index 000000000..21acc0987
--- /dev/null
+++ b/tests/delegates/compatible.vala
@@ -0,0 +1,14 @@
+delegate void Func ();
+delegate void CompatibleFunc ();
+
+interface Foo : Object {
+ public abstract void foo (Func? func);
+}
+
+class Bar : Object, Foo {
+ public void foo (CompatibleFunc? func) {
+ }
+}
+
+void main () {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]