Browse Source

Fixed bug where code actions could be null.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
c33d15e2de
  1. 11
      ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs
  2. 2
      ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssue.cs

11
ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs

@ -79,7 +79,16 @@ namespace ICSharpCode.NRefactory.CSharp @@ -79,7 +79,16 @@ namespace ICSharpCode.NRefactory.CSharp
SetChildByRole (Roles.Identifier, value);
}
}
public TypeParameterDeclaration ()
{
}
public TypeParameterDeclaration (string name)
{
Name = name;
}
public override void AcceptVisitor (IAstVisitor visitor)
{
visitor.VisitTypeParameterDeclaration (this);

2
ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssue.cs

@ -59,7 +59,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring @@ -59,7 +59,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
Actions = action ?? Enumerable.Empty<CodeAction> ();
}
public CodeIssue(string description, TextLocation start, TextLocation end, CodeAction action) : this (description, start, end, new [] { action })
public CodeIssue(string description, TextLocation start, TextLocation end, CodeAction action) : this (description, start, end, action != null ? new [] { action } : null)
{
}
}

Loading…
Cancel
Save