From: Rico Tzschichholz Date: Wed, 6 Dec 2017 17:25:33 +0000 (+0100) Subject: tests: Add further "use of generics in constructor" test X-Git-Tag: 0.39.2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61503f9ee4d185d18c33c0f9f4d9dd88c353c98f;p=thirdparty%2Fvala.git tests: Add further "use of generics in constructor" test https://bugzilla.gnome.org/show_bug.cgi?id=593137 --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 0cc909d91..ffaa3cfa0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -194,6 +194,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 000000000..6162e023e --- /dev/null +++ b/tests/objects/bug593137.vala @@ -0,0 +1,15 @@ +class Bar : Object { + public Bar (Type type) { + assert (type == typeof (string)); + } +} + +class Foo : Bar { + public Foo () { + base (typeof (G)); + } +} + +void main () { + var foo = new Foo (); +}