summaryrefslogtreecommitdiff
path: root/tests/basic-types/bug678791.vala
diff options
context:
space:
mode:
authorSimon Werbeck <simon.werbeck@gmail.com>2014-06-29 17:00:37 +0200
committerLuca Bruno <luca.bruno@immobiliare.it>2014-06-30 15:40:56 +0200
commit61d372c3d65f7830a17ac8aa34b1eb2269b311a7 (patch)
tree00b12f3361806c5af8568794b422ef7565012204 /tests/basic-types/bug678791.vala
parent3f777384ca8dee53605dff49bc4136b8c5c2e0e8 (diff)
downloadvala-61d372c3d65f7830a17ac8aa34b1eb2269b311a7.tar.gz
Fix comparison of nullable value types
Fixes bug 678791
Diffstat (limited to 'tests/basic-types/bug678791.vala')
-rw-r--r--tests/basic-types/bug678791.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/basic-types/bug678791.vala b/tests/basic-types/bug678791.vala
new file mode 100644
index 000000000..2f3171fef
--- /dev/null
+++ b/tests/basic-types/bug678791.vala
@@ -0,0 +1,15 @@
+public enum Foo {
+ BAR
+}
+
+void main () {
+ int? a = null;
+ int b = 1;
+ assert (a != b);
+ assert (b != a);
+
+ Foo? f = null;
+ Foo g = Foo.BAR;
+ assert (f != g);
+ assert (g != f);
+}