Use accessible get/set arguments for collection element receiver
When generating collection element receiver (such as 'a[i]'), accessible descriptor for get/set operator should be used. Otherwise, if the corresponding get/set operator fun is called via an accessor, its argument types may be different in case of generic fun specialized with primitive types. #KT-20387 Fixed
This commit is contained in:
@@ -3914,7 +3914,9 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
|
||||
boolean isGetter = OperatorNameConventions.GET.equals(operationDescriptor.getName());
|
||||
|
||||
Callable callable = resolveToCallable(operationDescriptor, false, isGetter ? resolvedGetCall : resolvedSetCall);
|
||||
ResolvedCall<FunctionDescriptor> resolvedCall = isGetter ? resolvedGetCall : resolvedSetCall;
|
||||
assert resolvedCall != null : "No resolved call for " + operationDescriptor;
|
||||
Callable callable = resolveToCallable(accessibleFunctionDescriptor(resolvedCall), false, resolvedCall);
|
||||
Callable callableMethod = resolveToCallableMethod(operationDescriptor, false);
|
||||
Type[] argumentTypes = callableMethod.getParameterTypes();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user