Browse Source

Merge pull request #512 from SLaks/fix-vs2015

Make project build on Visual Studio 2015
pull/521/head
Siegfried Pammer 11 years ago
parent
commit
1b1ee57db7
  1. 3
      .gitignore
  2. 3
      ICSharpCode.Decompiler/Tests/CodeSampleFileParser.cs
  3. 10
      ICSharpCode.Decompiler/Tests/CustomShortCircuitOperators.cs
  4. 2
      ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs
  5. 2
      NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/OptionalParameterCouldBeSkippedIssue.cs
  6. 2
      NRefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs
  7. 1
      NRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

3
.gitignore vendored

@ -10,4 +10,5 @@ obj/
_ReSharper*/ _ReSharper*/
*.ReSharper *.ReSharper
*.patch *.patch
/packages /packages
*.ide/

3
ICSharpCode.Decompiler/Tests/CodeSampleFileParser.cs

@ -87,7 +87,8 @@ namespace ICSharpCode.Decompiler.Tests
{ {
if(String.IsNullOrWhiteSpace(s)) if(String.IsNullOrWhiteSpace(s))
return true; return true;
return s.Trim().StartsWith("//"); s = s.Trim();
return s.StartsWith("//") || s.StartsWith("#"); // Also ignore #pragmas for warning suppression
} }
public static string ConcatLines(IEnumerable<string> lines) public static string ConcatLines(IEnumerable<string> lines)

10
ICSharpCode.Decompiler/Tests/CustomShortCircuitOperators.cs

@ -20,21 +20,19 @@ using System;
public static class CustomShortCircuitOperators public static class CustomShortCircuitOperators
{ {
private class B // TODO: Restore base class after https://roslyn.codeplex.com/workitem/358 is fixed.
private class C
{ {
public static bool operator true(CustomShortCircuitOperators.B x) public static bool operator true(CustomShortCircuitOperators.C x)
{ {
return true; return true;
} }
public static bool operator false(CustomShortCircuitOperators.B x) public static bool operator false(CustomShortCircuitOperators.C x)
{ {
return false; return false;
} }
}
private class C : CustomShortCircuitOperators.B
{
public static CustomShortCircuitOperators.C operator &(CustomShortCircuitOperators.C x, CustomShortCircuitOperators.C y) public static CustomShortCircuitOperators.C operator &(CustomShortCircuitOperators.C x, CustomShortCircuitOperators.C y)
{ {
return null; return null;

2
ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs

@ -664,7 +664,9 @@ namespace HideMembers3
} }
public class J2 : J public class J2 : J
{ {
#pragma warning disable 0108 // Deliberate bad code for test case
public int get_P; public int get_P;
#pragma warning restore 0108
} }
} }
//$$ HideMembers4 //$$ HideMembers4

2
NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/OptionalParameterCouldBeSkippedIssue.cs

@ -84,7 +84,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
}); });
var issueMessage = ctx.TranslateString("Argument is identical to the default value"); var issueMessage = ctx.TranslateString("Argument is identical to the default value");
var lastPositionalArgument = redundantArguments.FirstOrDefault(expression => !(expression is NamedArgumentExpression)); var lastPositionalArgument = redundantArguments.FirstOrDefault(expression => !(expression is NamedArgumentExpression));
bool hasNamedArguments = false;
foreach (var argument in redundantArguments) { foreach (var argument in redundantArguments) {
var localArgument = argument; var localArgument = argument;
@ -100,7 +99,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
var newInvocation = generateReplacement(node, newArgumentList); var newInvocation = generateReplacement(node, newArgumentList);
script.Replace(node, newInvocation); script.Replace(node, newInvocation);
})); }));
hasNamedArguments = true;
} else { } else {
var title = ctx.TranslateString("Remove this and the following positional arguments"); var title = ctx.TranslateString("Remove this and the following positional arguments");
actions.Add(new CodeAction(title, script => { actions.Add(new CodeAction(title, script => {

2
NRefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs

@ -800,7 +800,7 @@ namespace ICSharpCode.NRefactory.VB.Visitors
throw new NotImplementedException(); throw new NotImplementedException();
return EndNode(queryGroupClause, op); //return EndNode(queryGroupClause, op);
} }
public AstNode VisitAttribute(CSharp.Attribute attribute, object data) public AstNode VisitAttribute(CSharp.Attribute attribute, object data)

1
NRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

@ -87,6 +87,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// Warning: if delay-loading is used and the type system is accessed by multiple threads, /// Warning: if delay-loading is used and the type system is accessed by multiple threads,
/// the callback may be invoked concurrently on multiple threads. /// the callback may be invoked concurrently on multiple threads.
/// </remarks> /// </remarks>
[CLSCompliant(false)]
public Action<IUnresolvedEntity, MemberReference> OnEntityLoaded { get; set; } public Action<IUnresolvedEntity, MemberReference> OnEntityLoaded { get; set; }
/// <summary> /// <summary>

Loading…
Cancel
Save