Project

Profile

Help

Bug #4041

closed

Overloaded extension functions in .NET

Added by Michael Kay over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
.NET API
Sprint/Milestone:
-
Start date:
2018-11-20
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.8, 9.9
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

The .NET code for reflexive extension functions appears not to be handling overloaded methods (where more than one method matches the requirement and it's not possible to make an early decision which to use). (Search DotNetExtensionLibrary for "UnresolvedExtensionFunction"). The code to handle this case is commented out with the comment "TODO: Temporary". The code was present in the 9.6 release, and has been commented out in 9.7, 9.8, and 9.9.

Actions #1

Updated by O'Neil Delpratt over 5 years ago

Update:

So far we have managed to trigger this code with the following nunit test case:

public static String p(String a, Object b) {return "test";}

public static String p(Object a, String b) {return "test";}

The bind method still returns null in the case where it cannot decide between more than one candidate which to execute. We have added some diagnostic information informing the user of the problem. I will leave this bug issue open to come back to later.

Actions #2

Updated by O'Neil Delpratt about 5 years ago

  • Status changed from New to Closed

Closing this bug issue. If a user hits this problem again we can will reopen it.

Please register to edit this issue

Also available in: Atom PDF