Skip to content

Generic method with differently named generic arguments to parent throws KeyNotFoundException #106

@HelloKitty

Description

@HelloKitty

Issue: Throws KeyNotFoundException in https://github.com/castleproject/Core/blob/master/src/Castle.Core/DynamicProxy/Generators/Emitters/AbstractTypeEmitter.cs at method public Type[] GetGenericArgumentsFor(MethodInfo genericMethod)

Conditions: When Type name of generic type doesn't match the name of the Type in an interface.

Workaround: Change any generic Type names to match the name on the source interface.

This happens in Mono and .Net. If a generic method's generic Type name mismatches with its implemented name then this throws in Moq.

Original issues incorrectly posted on Moq's GitHub: here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions