Create DONT_CARE type only for dependent lambdas (i.e. to be resolved through the type inference later)
^KT-47493 Fixed
This commit is contained in:
committed by
teamcityserver
parent
dbdc6176f0
commit
1966915e92
+1
-1
@@ -394,7 +394,7 @@ public class ExpressionTypingServices {
|
||||
return blockLevelVisitor.getTypeInfo(statementExpression, context.replaceExpectedType(expectedType), true);
|
||||
}
|
||||
|
||||
if (KtPsiUtil.deparenthesize(statementExpression) instanceof KtLambdaExpression) {
|
||||
if (KtPsiUtil.deparenthesize(statementExpression) instanceof KtLambdaExpression && context.contextDependency == ContextDependency.DEPENDENT) {
|
||||
KotlinTypeInfo typeInfo = createDontCareTypeInfoForNILambda(statementExpression, context);
|
||||
if (typeInfo != null) return typeInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user