Allow invoke-convention on dynamic expressions
This commit is contained in:
+1
-2
@@ -124,8 +124,7 @@ public class TaskPrioritizer {
|
||||
) {
|
||||
ProgressIndicatorProvider.checkCanceled();
|
||||
|
||||
ReceiverValue dispatchReceiver = c.context.call.getDispatchReceiver();
|
||||
boolean resolveInvoke = dispatchReceiver.exists() && !TypesPackage.isDynamic(dispatchReceiver.getType());
|
||||
boolean resolveInvoke = c.context.call.getDispatchReceiver().exists();
|
||||
if (resolveInvoke) {
|
||||
addCandidatesForInvoke(receiver, c);
|
||||
return;
|
||||
|
||||
@@ -61,6 +61,12 @@ object DynamicCallableDescriptors {
|
||||
|
||||
override fun getFunctions(name: Name): Collection<FunctionDescriptor> {
|
||||
if (isAugmentedAssignmentConvention(name)) return listOf()
|
||||
if (call.getCallType() == Call.CallType.INVOKE
|
||||
&& call.getValueArgumentList() == null && call.getFunctionLiteralArguments().isEmpty()) {
|
||||
// this means that we are looking for "imaginary" invokes,
|
||||
// e.g. in `+d` we are looking for property "plus" with member "invoke"
|
||||
return listOf()
|
||||
}
|
||||
return listOf(createDynamicFunction(owner, name, call))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user