diff --git a/MetadataProvider/AssemblyExtractor.cs b/MetadataProvider/AssemblyExtractor.cs index 66787d90..9bb007be 100644 --- a/MetadataProvider/AssemblyExtractor.cs +++ b/MetadataProvider/AssemblyExtractor.cs @@ -626,6 +626,12 @@ private void ExtractParameters(IList parameters) if (!currentMethod.IsStatic) { IType type = currentMethod.ContainingType; + + if (currentMethod.ContainingType.GenericParameters.Count > 0) + { + // within a generic method body, "this" is not the generic type itself but its instantiation + type = currentMethod.ContainingType.Instantiate(currentMethod.ContainingType.GenericParameters); + } if (type.TypeKind == TypeKind.ValueType) {