]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add further "use of generics in constructor" test
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 6 Dec 2017 17:25:33 +0000 (18:25 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 9 Dec 2017 13:34:50 +0000 (14:34 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=593137

tests/Makefile.am
tests/objects/bug593137.vala [new file with mode: 0644]

index 5a42d51b47e8848200841aa0f0be43d3e34a5487..f9cee739138a95068d9d7944af626a2ea2f0a11f 100644 (file)
@@ -161,6 +161,7 @@ TESTS = \
        objects/bug587905.test \
        objects/bug588203.vala \
        objects/bug589928.vala \
+       objects/bug593137.vala \
        objects/bug593260.vala \
        objects/bug596621.vala \
        objects/bug597155.vala \
diff --git a/tests/objects/bug593137.vala b/tests/objects/bug593137.vala
new file mode 100644 (file)
index 0000000..6162e02
--- /dev/null
@@ -0,0 +1,15 @@
+class Bar : Object {
+       public Bar (Type type) {
+               assert (type == typeof (string));
+       }
+}
+
+class Foo<G> : Bar {
+       public Foo () {
+               base (typeof (G));
+       }
+}
+
+void main () {
+       var foo = new Foo<string> ();
+}