[vala/0.40] 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/0.40] tests: Add regression test for generic-type interference of static function
- Date: Tue, 9 Apr 2019 13:48:26 +0000 (UTC)
commit efacb9f04a24699200c00a342a3494b664b40e1a
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 3532f3ef1..494e9ca31 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -394,6 +394,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]