Get rid of passing typeChecker from the call hierarchy
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -255,7 +255,7 @@ private fun KtNamedDeclaration.guessType(context: BindingContext): Array<KotlinT
|
||||
if (expectedTypes.isEmpty() || expectedTypes.any { expectedType -> ErrorUtils.containsErrorType(expectedType) }) {
|
||||
return arrayOf()
|
||||
}
|
||||
val theType = TypeIntersector.intersectTypes(KotlinTypeChecker.DEFAULT, expectedTypes)
|
||||
val theType = TypeIntersector.intersectTypes(expectedTypes)
|
||||
return if (theType != null) {
|
||||
arrayOf(theType)
|
||||
}
|
||||
|
||||
+1
-2
@@ -66,7 +66,6 @@ import org.jetbrains.kotlin.resolve.bindingContextUtil.isUsedAsStatement
|
||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getCalleeExpressionIfAny
|
||||
import org.jetbrains.kotlin.resolve.scopes.LexicalScope
|
||||
import org.jetbrains.kotlin.types.*
|
||||
import org.jetbrains.kotlin.types.checker.KotlinTypeChecker
|
||||
import org.jetbrains.kotlin.types.typeUtil.makeNullable
|
||||
import org.jetbrains.kotlin.utils.DFS
|
||||
import org.jetbrains.kotlin.utils.DFS.*
|
||||
@@ -514,7 +513,7 @@ internal class MutableParameter(
|
||||
private val defaultType: KotlinType by lazy {
|
||||
writable = false
|
||||
if (defaultTypes.isNotEmpty()) {
|
||||
TypeIntersector.intersectTypes(KotlinTypeChecker.DEFAULT, defaultTypes)!!
|
||||
TypeIntersector.intersectTypes(defaultTypes)!!
|
||||
}
|
||||
else originalType
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user