You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.371
Former-commit-id: 1cedda3b6a8e480191a7a40a8dc33eb078fba58b
This commit is contained in:
parent
62edeef69b
commit
069517201b
@@ -365,7 +365,7 @@ namespace Mono.CSharp
|
||||
// }
|
||||
//
|
||||
if (!IsMissingType (type) && type.IsGenericTypeDefinition) {
|
||||
var start_pos = spec.DeclaringType == null ? 0 : spec.DeclaringType.MemberDefinition.TypeParametersCount;
|
||||
var start_pos = GetDeclaringTypesTypeParametersCount (spec);
|
||||
var targs = CreateGenericArguments (start_pos, type.GetGenericArguments (), dtype);
|
||||
spec = spec.MakeGenericType (module, targs);
|
||||
}
|
||||
@@ -381,6 +381,17 @@ namespace Mono.CSharp
|
||||
return tspec;
|
||||
}
|
||||
|
||||
static int GetDeclaringTypesTypeParametersCount (TypeSpec spec)
|
||||
{
|
||||
int total = 0;
|
||||
while (spec.DeclaringType != null) {
|
||||
total += spec.DeclaringType.MemberDefinition.TypeParametersCount;
|
||||
spec = spec.DeclaringType;
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
public MethodSpec CreateMethod (MethodBase mb, TypeSpec declaringType)
|
||||
{
|
||||
Modifiers mod = ReadMethodModifiers (mb, declaringType);
|
||||
|
||||
Reference in New Issue
Block a user