Permalink
Browse files

fixed bug.

  • Loading branch information...
1 parent 99b60b8 commit b36846581b038896fd664f8f701e8cffe563eaa8 @mkrueger mkrueger committed Jun 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ICSharpCode.NRefactory/CSharp/Resolver/MemberLookup.cs
@@ -167,7 +167,7 @@ public ResolveResult Lookup(IType type, string name, IList<IType> typeArguments,
// Consider nested types only if it's not an invocation. The type parameter count must match in this case.
Predicate<ITypeDefinition> typeFilter = delegate (ITypeDefinition d) {
// inner types contain the type parameters of outer types. therefore this count has to been adjusted.
- int correctedCount = d.TypeParameterCount - type.TypeParameterCount;
+ int correctedCount = d.TypeParameterCount - (d.DeclaringType != null ? d.DeclaringType.TypeParameterCount : 0);
return correctedCount == typeArgumentCount && d.Name == name && IsAccessible(d, true);
};
types.AddRange(type.GetNestedTypes(context, typeFilter));

0 comments on commit b368465

Please sign in to comment.