Permalink
Browse files

fix varible access for comma

  • Loading branch information...
1 parent d9ff656 commit 0198494ba772a09e92d23055560f081c3e789272 @andrewrk committed Dec 7, 2010
Showing with 5 additions and 2 deletions.
  1. +5 −2 code_generation.cpp
View
@@ -1419,8 +1419,11 @@ TypeDenoter * MethodGenerator::get_class_type(VariableAccess * variable_access)
case VariableAccess::INDEXED_VARIABLE:
{
TypeDenoter * type = get_class_type(variable_access->indexed_variable->variable);
- assert(type->type == TypeDenoter::ARRAY);
- return type->array_type->type;
+ for (ExpressionList * expression_list = variable_access->indexed_variable->expression_list; expression_list != NULL; expression_list = expression_list->next) {
+ assert(type->type == TypeDenoter::ARRAY);
+ type = type->array_type->type;
+ }
+ return type;
}
case VariableAccess::ATTRIBUTE:
{

0 comments on commit 0198494

Please sign in to comment.