Minor. Rename isAnonymousFunction to isFunctionExpression
This commit is contained in:
committed by
teamcityserver
parent
c0a46eaefd
commit
61fe70b600
+1
-1
@@ -81,7 +81,7 @@ object ConeConstraintSystemUtilContext : ConstraintSystemUtilContext {
|
||||
private fun FirAnonymousFunction.collectDeclaredValueParameterTypes(): List<ConeKotlinType?> =
|
||||
valueParameters.map { it.returnTypeRef.coneTypeSafe() }
|
||||
|
||||
override fun PostponedAtomWithRevisableExpectedType.isAnonymousFunction(): Boolean {
|
||||
override fun PostponedAtomWithRevisableExpectedType.isFunctionExpression(): Boolean {
|
||||
require(this is PostponedResolvedAtom)
|
||||
return this is LambdaWithTypeVariableAsExpectedTypeAtom && !this.atom.anonymousFunction.isLambda
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ interface ConstraintSystemUtilContext {
|
||||
fun createArgumentConstraintPosition(argument: PostponedAtomWithRevisableExpectedType): ArgumentConstraintPosition<*>
|
||||
fun <T> createFixVariableConstraintPosition(variable: TypeVariableMarker, atom: T): FixVariableConstraintPosition<T>
|
||||
fun extractLambdaParameterTypesFromDeclaration(declaration: PostponedAtomWithRevisableExpectedType): List<KotlinTypeMarker?>?
|
||||
fun PostponedAtomWithRevisableExpectedType.isAnonymousFunction(): Boolean
|
||||
fun PostponedAtomWithRevisableExpectedType.isFunctionExpression(): Boolean
|
||||
fun PostponedAtomWithRevisableExpectedType.isFunctionExpressionWithReceiver(): Boolean
|
||||
fun createTypeVariableForLambdaReturnType(): TypeVariableMarker
|
||||
fun createTypeVariableForLambdaParameterType(argument: PostponedAtomWithRevisableExpectedType, index: Int): TypeVariableMarker
|
||||
|
||||
+2
-2
@@ -301,7 +301,7 @@ class PostponedArgumentInputTypesResolver(
|
||||
*
|
||||
* TODO: regarding anonymous functions: see info about need for analysis in partial mode in `collectParameterTypesAndBuildNewExpectedTypes`
|
||||
*/
|
||||
if (areAllParameterTypesSpecified && !isExtensionFunction && !argument.isAnonymousFunction())
|
||||
if (areAllParameterTypesSpecified && !isExtensionFunction && !argument.isFunctionExpression())
|
||||
return null
|
||||
|
||||
val allParameterTypes =
|
||||
@@ -389,7 +389,7 @@ class PostponedArgumentInputTypesResolver(
|
||||
*
|
||||
* TODO: investigate why we can't do it for anonymous functions in full mode always (see `diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt`)
|
||||
*/
|
||||
if (completionMode == ConstraintSystemCompletionMode.PARTIAL && !argument.isAnonymousFunction())
|
||||
if (completionMode == ConstraintSystemCompletionMode.PARTIAL && !argument.isFunctionExpression())
|
||||
return@any false
|
||||
if (argument.revisedExpectedType != null) return@any false
|
||||
val parameterTypesInfo =
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ class ClassicConstraintSystemUtilContext(
|
||||
}
|
||||
}
|
||||
|
||||
override fun PostponedAtomWithRevisableExpectedType.isAnonymousFunction(): Boolean {
|
||||
override fun PostponedAtomWithRevisableExpectedType.isFunctionExpression(): Boolean {
|
||||
require(this is ResolvedAtom)
|
||||
return this.atom is FunctionExpression
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user