FIR: don't create incorrect constraints in CallableReferenceResolution
#KT-50994 Fixed Related to KT-49477
This commit is contained in:
+4
-1
@@ -63,7 +63,10 @@ internal object CheckCallableReferenceExpectedType : CheckerStage() {
|
||||
|
||||
val position = SimpleConstraintSystemConstraintPosition //TODO
|
||||
|
||||
if (expectedType != null) {
|
||||
if (expectedType != null && !resultingType.contains {
|
||||
it is ConeTypeVariableType && it.lookupTag !in outerCsBuilder.currentStorage().allTypeVariables
|
||||
}
|
||||
) {
|
||||
addSubtypeConstraint(resultingType, expectedType, position)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user