Browse Source

Fixed issue with nullable types not being usable as generic arguments.

newNRvisualizers
erikkallen 14 years ago
parent
commit
9c521f8992
  1. 2
      ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs

2
ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs

@ -507,7 +507,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
if (!ctors.Any()) if (!ctors.Any())
return false; return false;
} }
foreach (IType constraintType in typeParameter.DirectBaseTypes) { foreach (IType constraintType in typeParameter.DirectBaseTypes.Where(tp => !tp.IsKnownType(KnownTypeCode.Object))) {
IType c = constraintType; IType c = constraintType;
if (substitution != null) if (substitution != null)
c = c.AcceptVisitor(substitution); c = c.AcceptVisitor(substitution);

Loading…
Cancel
Save