For properties on id referenced objects, we can ignore the lack of the FINAL
keyword on properties, as we want the same "lexical" lookup rules like for
properties on the scope or context objects. In addition we need to initialize
the resolver on the returned temp, to ensure a successful type determination in
the use of the id object afterwards.
Change-Id: I496c942ade55aa331e6972f06b21c2c86d4b00a4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
_function->idObjectDependencies.insert(mapping.idIndex);
V4IR::Expr *s = subscript(_block->TEMP(_idArrayTemp), _block->CONST(V4IR::SInt32Type, mapping.idIndex));
V4IR::Temp *result = _block->TEMP(_block->newTemp());
- initMetaObjectResolver(&result->memberResolver, mapping.type);
_block->MOVE(result, s);
result = _block->TEMP(result->index);
+ initMetaObjectResolver(&result->memberResolver, mapping.type);
+ result->memberResolver.flags |= AllPropertiesAreFinal;
result->isReadOnly = true; // don't allow use as lvalue
return result;
}