summaryrefslogtreecommitdiff
path: root/vala/valaarraycreationexpression.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2009-05-08 14:19:57 +0200
committerJürg Billeter <j@bitron.ch>2009-05-08 14:19:57 +0200
commitdcd867956453fe75236fe3c081e2e81e51376967 (patch)
tree8d45aa8a610e462f74982cded44a82eac3e8c2cd /vala/valaarraycreationexpression.vala
parent1fe4e1b7a91e8de2cde81e29382b6b4fd7510ba1 (diff)
downloadvala-dcd867956453fe75236fe3c081e2e81e51376967.tar.gz
Support enum values as array indices
Diffstat (limited to 'vala/valaarraycreationexpression.vala')
-rw-r--r--vala/valaarraycreationexpression.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/vala/valaarraycreationexpression.vala b/vala/valaarraycreationexpression.vala
index 8b8049c4f..6181b0f67 100644
--- a/vala/valaarraycreationexpression.vala
+++ b/vala/valaarraycreationexpression.vala
@@ -193,7 +193,7 @@ public class Vala.ArrayCreationExpression : Expression {
if (e.value_type == null) {
/* return on previous error */
return false;
- } else if (!(e.value_type is IntegerType)) {
+ } else if (!(e.value_type is IntegerType || e.value_type is EnumValueType)) {
error = true;
Report.error (e.source_reference, "Expression of integer type expected");
}