Call resolution refactoring (logic hasn't changed)

- interfaces MemberPrioritizer, ResolutionCandidate introduced
- CallTransformationStrategy will be responsible for variable with 'invoke' method as function resolve
This commit is contained in:
Svetlana Isakova
2012-04-20 15:52:27 +04:00
parent 13764c06c0
commit 5ec7617c7a
12 changed files with 506 additions and 244 deletions
@@ -21,6 +21,7 @@ import com.google.dart.compiler.backend.js.ast.JsExpression;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lang.descriptors.CallableDescriptor;
import org.jetbrains.jet.lang.resolve.calls.ResolutionCandidate;
import org.jetbrains.jet.lang.resolve.calls.ResolvedCall;
import org.jetbrains.jet.lang.resolve.calls.ResolvedCallImpl;
import org.jetbrains.k2js.translate.context.TranslationContext;
@@ -103,7 +104,7 @@ public final class CallBuilder {
private CallTranslator finish() {
if (resolvedCall == null) {
assert descriptor != null;
resolvedCall = ResolvedCallImpl.create(descriptor);
resolvedCall = ResolvedCallImpl.create(ResolutionCandidate.create(descriptor));
}
if (descriptor == null) {
descriptor = resolvedCall.getCandidateDescriptor().getOriginal();