Have "in type" for java fields to be able to check that type in assignment positions (against rhs' type)
^KT-46727 Fixed
This commit is contained in:
+2
-2
@@ -371,8 +371,8 @@ public class ExpressionTypingVisitorForStatements extends ExpressionTypingVisito
|
||||
VariableDescriptor descriptor = BindingContextUtils.extractVariableFromResolvedCall(bindingContext, leftOperand);
|
||||
|
||||
if (descriptor instanceof PropertyDescriptor) {
|
||||
PropertySetterDescriptor setter = ((PropertyDescriptor) descriptor).getSetter();
|
||||
if (setter != null) return setter.getValueParameters().get(0).getType();
|
||||
KotlinType inType = ((PropertyDescriptor) descriptor).getInType();
|
||||
if (inType != null) return inType;
|
||||
}
|
||||
|
||||
return leftOperandType;
|
||||
|
||||
Reference in New Issue
Block a user