K2: Fix inference from assignment in PCLA
Before this, the order of the constraints being added was incorrect ^KT-64222 Fixed
This commit is contained in:
committed by
Space Team
parent
97d17012e5
commit
8f9c09482b
+2
-1
@@ -1035,7 +1035,8 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT
|
||||
// for cases like
|
||||
// buildSomething { tVar = "" // Should infer TV from String assignment }
|
||||
context.inferenceSession.addSubtypeConstraintIfCompatible(
|
||||
variableAssignment.lValue.resolvedType, variableAssignment.rValue.resolvedType,
|
||||
lowerType = variableAssignment.rValue.resolvedType,
|
||||
upperType = variableAssignment.lValue.resolvedType,
|
||||
variableAssignment,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user