]> 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>
Thu, 7 Dec 2017 13:12:03 +0000 (14:12 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=593137

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

index 7232aa21e7ff07fc4d664988bc12db9189a17614..cd7901e8a9bdbe00116e52b288c6469c66ef5359 100644 (file)
@@ -190,6 +190,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> ();
+}