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() } }