[FE 1.0] Create DONT_CARE type only for callable references with no expected type
Otherwise, it can be resolved safety ^KT-52270 Fixed
This commit is contained in:
committed by
teamcity
parent
fb21937eb1
commit
2057deb91b
+1
-1
@@ -382,7 +382,7 @@ public class ExpressionTypingServices {
|
||||
)
|
||||
);
|
||||
|
||||
if (!isUnitExpectedType && statementExpression instanceof KtCallableReferenceExpression) {
|
||||
if (context.expectedType == NO_EXPECTED_TYPE && statementExpression instanceof KtCallableReferenceExpression) {
|
||||
KotlinTypeInfo typeInfo = createDontCareTypeInfoForNILambda(statementExpression, context);
|
||||
if (typeInfo != null) return typeInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user