summaryrefslogtreecommitdiff
path: root/tests/structs
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2019-03-01 09:45:56 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2019-03-01 09:45:56 +0100
commitfd487e0292f4e17f54a4adbf4d6bb37c1359620e (patch)
tree2f0310344d16fa829e5e00fa4101ae7c10c82095 /tests/structs
parent8629327cac8571bb71d19ec1ce683e24781beb3e (diff)
downloadvala-fd487e0292f4e17f54a4adbf4d6bb37c1359620e.tar.gz
codegen: Include "glib-object.h" for typeof expression
Diffstat (limited to 'tests/structs')
-rw-r--r--tests/structs/default-gtype.vala11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/structs/default-gtype.vala b/tests/structs/default-gtype.vala
new file mode 100644
index 000000000..93b245b64
--- /dev/null
+++ b/tests/structs/default-gtype.vala
@@ -0,0 +1,11 @@
+struct Foo {
+ public int field;
+}
+
+[CCode (has_type_id = false)]
+struct Bar : Foo {
+}
+
+void main () {
+ assert (typeof (Bar) == typeof (Foo));
+}