vala r2105 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2105 - in trunk: . vala
- Date: Sun, 30 Nov 2008 22:33:53 +0000 (UTC)
Author: juergbi
Date: Sun Nov 30 22:33:53 2008
New Revision: 2105
URL: http://svn.gnome.org/viewvc/vala?rev=2105&view=rev
Log:
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
Modified:
trunk/ChangeLog
trunk/vala/valaarraycreationexpression.vala
trunk/vala/valaelementaccess.vala
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/vala/valaarraycreationexpression.vala
==============================================================================
--- trunk/vala/valaarraycreationexpression.vala (original)
+++ trunk/vala/valaarraycreationexpression.vala Sun Nov 30 22:33:53 2008
@@ -180,7 +180,7 @@
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");
}
Modified: trunk/vala/valaelementaccess.vala
==============================================================================
--- trunk/vala/valaelementaccess.vala (original)
+++ trunk/vala/valaelementaccess.vala Sun Nov 30 22:33:53 2008
@@ -209,7 +209,7 @@
}
/* 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");
}
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Sun Nov 30 22:33:53 2008
@@ -50,6 +50,7 @@
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;
@@ -94,6 +95,7 @@
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"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]