[vala/0.34] tests: Add further "use of generics in constructor" test



commit 2283405c6b83db2123d95e712f3157ce9d3f5234
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Dec 6 18:25:33 2017 +0100

    tests: Add further "use of generics in constructor" test
    
    https://bugzilla.gnome.org/show_bug.cgi?id=593137

 tests/Makefile.am            |    1 +
 tests/objects/bug593137.vala |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5a42d51..f9cee73 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
index 0000000..6162e02
--- /dev/null
+++ b/tests/objects/bug593137.vala
@@ -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> ();
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]