vala r2029 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2029 - in trunk: . vala
- Date: Mon, 17 Nov 2008 21:36:38 +0000 (UTC)
Author: juergbi
Date: Mon Nov 17 21:36:37 2008
New Revision: 2029
URL: http://svn.gnome.org/viewvc/vala?rev=2029&view=rev
Log:
2008-11-17 JÃrg Billeter <j bitron ch>
* vala/valaarraycreationexpression.vala:
* vala/valaelementaccess.vala:
* vala/valasourcefile.vala:
Allow any integer compatible value to be used as array index,
fixes bug 561057
Modified:
trunk/ChangeLog
trunk/vala/valaarraycreationexpression.vala
trunk/vala/valaelementaccess.vala
trunk/vala/valasourcefile.vala
Modified: trunk/vala/valaarraycreationexpression.vala
==============================================================================
--- trunk/vala/valaarraycreationexpression.vala (original)
+++ trunk/vala/valaarraycreationexpression.vala Mon Nov 17 21:36:37 2008
@@ -180,7 +180,7 @@
if (e.value_type == null) {
/* return on previous error */
return false;
- } else if (!(e.value_type.data_type is Struct) || !((Struct) e.value_type.data_type).is_integer_type ()) {
+ } else if (!e.value_type.compatible (analyzer.long_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 Mon Nov 17 21:36:37 2008
@@ -199,7 +199,7 @@
}
/* check if the index is of type integer */
- if (!(e.value_type.data_type is Struct) || !((Struct) e.value_type.data_type).is_integer_type ()) {
+ if (!e.value_type.compatible (analyzer.long_type)) {
error = true;
Report.error (e.source_reference, "Expression of integer type expected");
}
Modified: trunk/vala/valasourcefile.vala
==============================================================================
--- trunk/vala/valasourcefile.vala (original)
+++ trunk/vala/valasourcefile.vala Mon Nov 17 21:36:37 2008
@@ -457,7 +457,7 @@
{
source_array = new Gee.ArrayList<string> ();
string[] lines = cont.split ("\n", 0);
- uint idx;
+ int idx;
for (idx = 0; lines[idx] != null; ++idx) {
source_array.add (lines[idx]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]