[vala/staging] tests: Add further "use of generics in constructor" test
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] tests: Add further "use of generics in constructor" test
- Date: Wed, 6 Dec 2017 17:42:36 +0000 (UTC)
commit 61503f9ee4d185d18c33c0f9f4d9dd88c353c98f
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 0cc909d..ffaa3cf 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 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]