summaryrefslogtreecommitdiff
path: root/tests/enums
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/enums
parent8629327cac8571bb71d19ec1ce683e24781beb3e (diff)
downloadvala-fd487e0292f4e17f54a4adbf4d6bb37c1359620e.tar.gz
codegen: Include "glib-object.h" for typeof expression
Diffstat (limited to 'tests/enums')
-rw-r--r--tests/enums/default-gtype.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/enums/default-gtype.vala b/tests/enums/default-gtype.vala
new file mode 100644
index 000000000..152f72372
--- /dev/null
+++ b/tests/enums/default-gtype.vala
@@ -0,0 +1,15 @@
+[CCode (has_type_id = false)]
+enum Foo {
+ MANAM
+}
+
+[CCode (has_type_id = false)]
+[Flags]
+enum Bar {
+ MANAM
+}
+
+void main () {
+ assert (typeof (Foo) == typeof (int));
+ assert (typeof (Bar) == typeof (uint));
+}