Fixed: control flow graph building for array of functions.

'get' call for array should be get from INDEXED_LVALUE_GET
This commit is contained in:
Svetlana Isakova
2013-12-06 15:57:56 +04:00
parent 3966f36b0c
commit 4c4e192914
4 changed files with 35 additions and 2 deletions
@@ -875,8 +875,9 @@ public class JetControlFlowProcessor {
@Override
public void visitArrayAccessExpression(@NotNull JetArrayAccessExpression expression) {
mark(expression);
if (!generateCall(expression)) {
generateArrayAccess(expression, getResolvedCall(expression));
ResolvedCall<FunctionDescriptor> getMethodResolvedCall = trace.get(BindingContext.INDEXED_LVALUE_GET, expression);
if (!checkAndGenerateCall(expression, getMethodResolvedCall)) {
generateArrayAccess(expression, getMethodResolvedCall);
}
}