Skip to content

Commit

Permalink
Fixed navigation data when deriving from generic class
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2 committed Feb 18, 2018
1 parent 1cacf89 commit b4703ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/NUnitTestAdapter/Metadata/DirectReflectionMetadataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ internal sealed class DirectReflectionMetadataProvider : IMetadataProvider
{
var type = TryGetSingleMethod(assemblyPath, reflectedTypeName, methodName)?.DeclaringType;
if (type == null) return null;

#if NET35
if (type.IsGenericType)
#else
if (type.IsConstructedGenericType)
#endif
{
type = type.GetGenericTypeDefinition();
}

return new TypeInfo(type);
}

Expand Down

0 comments on commit b4703ae

Please sign in to comment.