From 7fef1c46134fddd7deba6c88ea996f9bc084acb1 Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Mon, 29 Jun 2015 20:33:20 +0300 Subject: [PATCH] Minor: inject builtIns to CallCompleter --- .../src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt index 9bda02e0631..bcf7feb5529 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt @@ -45,7 +45,8 @@ import java.util.ArrayList public class CallCompleter( val argumentTypeResolver: ArgumentTypeResolver, - val candidateResolver: CandidateResolver + val candidateResolver: CandidateResolver, + val builtIns: KotlinBuiltIns ) { fun completeCall( context: BasicCallResolutionContext, @@ -154,7 +155,7 @@ public class CallCompleter( if (returnType != null && expectedType === TypeUtils.UNIT_EXPECTED_TYPE) { updateSystemIfSuccessful { system -> - system.addSupertypeConstraint(KotlinBuiltIns.getInstance().getUnitType(), returnType, EXPECTED_TYPE_POSITION.position()) + system.addSupertypeConstraint(builtIns.getUnitType(), returnType, EXPECTED_TYPE_POSITION.position()) system.getStatus().isSuccessful() } }