From cf4cba0edd70c40af9df1ad04416891acdec5c57 Mon Sep 17 00:00:00 2001 From: Pavel Talanov Date: Wed, 7 Dec 2011 15:35:24 +0400 Subject: [PATCH] simple array tests pass --- .idea/workspace.xml | 61 +++++++++---------- .../translate/reference/CallTranslator.java | 12 ++-- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 12c0556fd90..c40c88c5864 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -7,9 +7,6 @@ - - - @@ -245,7 +242,7 @@ - + @@ -323,7 +320,7 @@ - + @@ -379,7 +376,7 @@ - + @@ -1242,7 +1239,7 @@ - - - - - - - @@ -1359,13 +1349,6 @@ - - - - - - - @@ -1382,15 +1365,6 @@ - - - - - - - - - @@ -1398,9 +1372,32 @@ + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/translator/src/org/jetbrains/k2js/translate/reference/CallTranslator.java b/translator/src/org/jetbrains/k2js/translate/reference/CallTranslator.java index 76526c24dae..f3379dce177 100644 --- a/translator/src/org/jetbrains/k2js/translate/reference/CallTranslator.java +++ b/translator/src/org/jetbrains/k2js/translate/reference/CallTranslator.java @@ -1,6 +1,8 @@ package org.jetbrains.k2js.translate.reference; -import com.google.dart.compiler.backend.js.ast.*; +import com.google.dart.compiler.backend.js.ast.JsExpression; +import com.google.dart.compiler.backend.js.ast.JsInvocation; +import com.google.dart.compiler.backend.js.ast.JsNew; import com.google.dart.compiler.util.AstUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -134,12 +136,12 @@ public final class CallTranslator extends AbstractTranslator { } @NotNull - private JsNameRef qualifiedMethodReference(@Nullable DeclarationDescriptor descriptor) { - JsName methodName = context().getNameForDescriptor(descriptor); + private JsExpression qualifiedMethodReference(@NotNull DeclarationDescriptor descriptor) { + JsExpression methodReference = ReferenceTranslator.translateReference(descriptor, context()); if (receiver != null) { - return AstUtil.qualified(methodName, receiver); + AstUtil.setQualifier(methodReference, receiver); } - return methodName.makeRef(); + return methodReference; } @NotNull