From: Jürg Billeter Date: Sat, 9 Jan 2010 11:27:53 +0000 (+0100) Subject: Support bitwise complement with enums X-Git-Tag: 0.7.10~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e16901098bdb021e4f62852babdd47c35e0d88c0;p=thirdparty%2Fvala.git Support bitwise complement with enums Fixes bug 597542. --- diff --git a/vala/valaunaryexpression.vala b/vala/valaunaryexpression.vala index f5b99e499..a171c8e7c 100644 --- a/vala/valaunaryexpression.vala +++ b/vala/valaunaryexpression.vala @@ -182,7 +182,7 @@ public class Vala.UnaryExpression : Expression { value_type = inner.value_type; } else if (operator == UnaryOperator.BITWISE_COMPLEMENT) { // integer type - if (!is_integer_type (inner.value_type)) { + if (!is_integer_type (inner.value_type) && !(inner.value_type is EnumValueType)) { error = true; Report.error (source_reference, "Operator not supported for `%s'".printf (inner.value_type.to_string ())); return false;