[vala/0.42] tests: Add "method override with compatible delegate parameter" test



commit e771336c50b3c3ad677f558b2f3af7968ad4a4ab
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 0e393d5fd..95dbf07ab 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -215,6 +215,7 @@ TESTS = \
        structs/bug775761.vala \
        structs/bug777194.vala \
        delegates/casting.vala \
+       delegates/compatible.vala \
        delegates/delegates.vala \
        delegates/delegates-error.test \
        delegates/fields.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]