[vala/staging: 1/2] tests: Add regression test for generic-type interference of static function
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 1/2] tests: Add regression test for generic-type interference of static function
- Date: Wed, 6 Mar 2019 16:33:01 +0000 (UTC)
commit 502fa272b77afa07fdd24ccc630cab301c9acb41
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Mar 6 17:25:05 2019 +0100
tests: Add regression test for generic-type interference of static function
tests/Makefile.am | 1 +
tests/generics/inference-static-function.vala | 9 +++++++++
2 files changed, 10 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f28a168e8..865228871 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -438,6 +438,7 @@ TESTS = \
asynchronous/result-pos.vala \
asynchronous/yield.vala \
generics/constructor-chain-up.vala \
+ generics/inference-static-function.vala \
generics/bug640330.test \
generics/bug640330.vala \
generics/bug694765-1.vala \
diff --git a/tests/generics/inference-static-function.vala b/tests/generics/inference-static-function.vala
new file mode 100644
index 000000000..4c004bb83
--- /dev/null
+++ b/tests/generics/inference-static-function.vala
@@ -0,0 +1,9 @@
+class Foo<G> {
+ public static G[] bar () {
+ return {};
+ }
+}
+
+void main () {
+ Foo<string>.bar ();
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]