+2008-11-30 Jürg Billeter <j@bitron.ch>
+
+ * vala/valaarraycreationexpression.vala:
+ * vala/valaelementaccess.vala:
+ * vala/valasemanticanalyzer.vala:
+
+ Accept any integer type as array index
+
2008-11-30 Jürg Billeter <j@bitron.ch>
* vapi/gstreamer-rtsp-0.10.vapi:
if (e.value_type == null) {
/* return on previous error */
return false;
- } else if (!e.value_type.compatible (analyzer.long_type)) {
+ } else if (!e.value_type.compatible (analyzer.uint64_type)) {
error = true;
Report.error (e.source_reference, "Expression of integer type expected");
}
}
/* check if the index is of type integer */
- if (!e.value_type.compatible (analyzer.long_type)) {
+ if (!e.value_type.compatible (analyzer.uint64_type)) {
error = true;
Report.error (e.source_reference, "Expression of integer type expected");
}
public DataType ulong_type;
public DataType size_t_type;
public DataType ssize_t_type;
+ public DataType uint64_type;
public DataType int8_type;
public DataType unichar_type;
public DataType double_type;
ulong_type = new ValueType ((TypeSymbol) root_symbol.scope.lookup ("ulong"));
size_t_type = new ValueType ((TypeSymbol) root_symbol.scope.lookup ("size_t"));
ssize_t_type = new ValueType ((TypeSymbol) root_symbol.scope.lookup ("ssize_t"));
+ uint64_type = new ValueType ((TypeSymbol) root_symbol.scope.lookup ("uint64"));
int8_type = new ValueType ((TypeSymbol) root_symbol.scope.lookup ("int8"));
unichar_type = new ValueType ((TypeSymbol) root_symbol.scope.lookup ("unichar"));
double_type = new ValueType ((TypeSymbol) root_symbol.scope.lookup ("double"));