Implement support for arrays for the indexer operator.

Fixes #6182
This commit is contained in:
Gunnar Beutner 2014-05-10 10:46:49 +02:00
parent 0c31bae792
commit ab8624d2f5
1 changed files with 3 additions and 0 deletions

View File

@ -437,6 +437,9 @@ Value AExpression::OpIndexer(const AExpression *expr, const Dictionary::Ptr& loc
if (value.IsObjectType<Dictionary>()) {
Dictionary::Ptr dict = value;
return dict->Get(index);
} else if (value.IsObjectType<Array>()) {
Array::Ptr arr = value;
return arr->Get(index);
} else if (value.IsObjectType<Object>()) {
Object::Ptr object = value;
const Type *type = object->GetReflectionType();