[vala/staging: 1/3] tests: Add "method override with compatible delegate parameter" test
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 1/3] tests: Add "method override with compatible delegate parameter" test
- Date: Fri, 19 Oct 2018 15:25:13 +0000 (UTC)
commit 69a20bc68baca399b9ecaa4cf80dcd23b4eb3463
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 59cf5685c..64a6e6805 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]