[vala/0.40] 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.40] tests: Add "method override with compatible delegate parameter" test
- Date: Sun, 28 Oct 2018 09:30:10 +0000 (UTC)
commit a6481ef6065a53a546357c6bf19d32d5c2497d54
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 3ce4ca2cd..94493fccf 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -209,6 +209,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]