Skip to content

[Torch - Reflection Utilities] AmbiguousMatchException in MethodProxy #20

@ghost

Description

Describe the bug
MethodProxy.Create<TDel> throws AmbiguousMatchException when tries to search target method

To Reproduce
Steps to reproduce the behavior:

  1. Make two methods with same name
  2. Try to create a proxy from one of these
  3. Get AmbiguousMatchException

Expected behavior
Searching should include other TDel generic types as method arguments and get valid target method.

Additional context
I guess it's can be fixed by using method overload with Type[] types here

var targetMethod = ownerType.GetMethod(methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions