]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add regression test for generic-type interference of static function
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 6 Mar 2019 16:25:05 +0000 (17:25 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 6 Mar 2019 16:26:27 +0000 (17:26 +0100)
tests/Makefile.am
tests/generics/inference-static-function.vala [new file with mode: 0644]

index f28a168e833392b2ab63c2d90bbc0f2de8bf1aef..86522887106e35e590b88585a28bf4c300461b5c 100644 (file)
@@ -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 (file)
index 0000000..4c004bb
--- /dev/null
@@ -0,0 +1,9 @@
+class Foo<G> {
+       public static G[] bar () {
+               return {};
+       }
+}
+
+void main () {
+       Foo<string>.bar ();
+}