[vala/0.42] tests: Add regression test for generic-type interference of static function



commit 7d19f46f751a76e253d8712b6c99d05a6d352fcb
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 af9ae54d7..caea87f06 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -410,6 +410,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]