Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/NRefactory.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Grunwald <daniel@danielgrunwald.de>2015-06-07 17:45:49 +0300
committerDaniel Grunwald <daniel@danielgrunwald.de>2015-06-07 17:45:49 +0300
commit0da9b3d110d3b3a9e08807d4d1157dc7d718515a (patch)
treef0d06b44e5aca87240208f03c780cc4d07cb7891 /ICSharpCode.NRefactory.CSharp
parent86856e9b11ff54b83a37df40085f4cc0075fe39d (diff)
TypeSystemAstBuilder: fix ShowTypeParameterConstraints
Diffstat (limited to 'ICSharpCode.NRefactory.CSharp')
-rw-r--r--ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs b/ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs
index ed64de88..1751b6f6 100644
--- a/ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs
+++ b/ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs
@@ -715,7 +715,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
}
if (this.ShowTypeParameters && this.ShowTypeParameterConstraints) {
- foreach (ITypeParameter tp in typeDefinition.TypeParameters) {
+ foreach (ITypeParameter tp in typeDefinition.TypeParameters.Skip(outerTypeParameterCount)) {
var constraint = ConvertTypeParameterConstraint(tp);
if (constraint != null)
decl.Constraints.Add(constraint);
@@ -1045,7 +1045,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
if (!IsObjectOrValueType(t))
c.BaseTypes.Add(ConvertType(t));
}
- if (tp.HasDefaultConstructorConstraint) {
+ if (tp.HasDefaultConstructorConstraint && !tp.HasValueTypeConstraint) {
c.BaseTypes.Add(new PrimitiveType("new"));
}
return c;