diff options
-rw-r--r-- | vala/valasliceexpression.vala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vala/valasliceexpression.vala b/vala/valasliceexpression.vala index 7b741a340..5b1675be8 100644 --- a/vala/valasliceexpression.vala +++ b/vala/valasliceexpression.vala @@ -1,7 +1,7 @@ /* valasliceexpression.vala * * Copyright (C) 2009 Robin Sonefors - * Copyright (C) 2009-2010 Jürg Billeter + * Copyright (C) 2009-2013 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -110,6 +110,11 @@ public class Vala.SliceExpression : Expression { return false; } + if (container.value_type is ArrayType) { + start.target_type = context.analyzer.int_type.copy (); + stop.target_type = context.analyzer.int_type.copy (); + } + if (!start.check (context)) { error = true; return false; |