Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vala
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Hewitt
vala
Commits
dcd86795
Commit
dcd86795
authored
May 08, 2009
by
Jürg Billeter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support enum values as array indices
parent
1fe4e1b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
vala/valaarraycreationexpression.vala
vala/valaarraycreationexpression.vala
+1
-1
vala/valaelementaccess.vala
vala/valaelementaccess.vala
+1
-1
No files found.
vala/valaarraycreationexpression.vala
View file @
dcd86795
...
...
@@ -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"
);
}
...
...
vala/valaelementaccess.vala
View file @
dcd86795
...
...
@@ -187,7 +187,7 @@ public class Vala.ElementAccess : Expression {
}
/* check if the index is of type integer */
if
(!(
e
.
value_type
is
IntegerType
))
{
if
(!(
e
.
value_type
is
IntegerType
||
e
.
value_type
is
EnumValueType
))
{
error
=
true
;
Report
.
error
(
e
.
source_reference
,
"Expression of integer type expected"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment