diff --git a/.gitignore b/.gitignore index e7c2de67d..5ab4836f1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ obj/ _ReSharper*/ *.ReSharper *.patch -/packages \ No newline at end of file +/packages +*.ide/ diff --git a/ICSharpCode.Decompiler/Tests/CodeSampleFileParser.cs b/ICSharpCode.Decompiler/Tests/CodeSampleFileParser.cs index 552d092ee..5cb49aad7 100644 --- a/ICSharpCode.Decompiler/Tests/CodeSampleFileParser.cs +++ b/ICSharpCode.Decompiler/Tests/CodeSampleFileParser.cs @@ -87,7 +87,8 @@ namespace ICSharpCode.Decompiler.Tests { if(String.IsNullOrWhiteSpace(s)) 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 lines) diff --git a/ICSharpCode.Decompiler/Tests/CustomShortCircuitOperators.cs b/ICSharpCode.Decompiler/Tests/CustomShortCircuitOperators.cs index f51908659..5bd0ec516 100644 --- a/ICSharpCode.Decompiler/Tests/CustomShortCircuitOperators.cs +++ b/ICSharpCode.Decompiler/Tests/CustomShortCircuitOperators.cs @@ -20,21 +20,19 @@ using System; 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; } - public static bool operator false(CustomShortCircuitOperators.B x) + public static bool operator false(CustomShortCircuitOperators.C x) { return false; } - } - private class C : CustomShortCircuitOperators.B - { public static CustomShortCircuitOperators.C operator &(CustomShortCircuitOperators.C x, CustomShortCircuitOperators.C y) { return null; diff --git a/ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs b/ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs index 22458bcfc..d8857c30a 100644 --- a/ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs +++ b/ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs @@ -664,7 +664,9 @@ namespace HideMembers3 } public class J2 : J { +#pragma warning disable 0108 // Deliberate bad code for test case public int get_P; +#pragma warning restore 0108 } } //$$ HideMembers4 diff --git a/NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/OptionalParameterCouldBeSkippedIssue.cs b/NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/OptionalParameterCouldBeSkippedIssue.cs index 6c7f378a4..6c681c8a1 100644 --- a/NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/OptionalParameterCouldBeSkippedIssue.cs +++ b/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 lastPositionalArgument = redundantArguments.FirstOrDefault(expression => !(expression is NamedArgumentExpression)); - bool hasNamedArguments = false; foreach (var argument in redundantArguments) { var localArgument = argument; @@ -100,7 +99,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring var newInvocation = generateReplacement(node, newArgumentList); script.Replace(node, newInvocation); })); - hasNamedArguments = true; } else { var title = ctx.TranslateString("Remove this and the following positional arguments"); actions.Add(new CodeAction(title, script => { diff --git a/NRefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs b/NRefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs index 9299eb99c..b2ff71cf5 100644 --- a/NRefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs +++ b/NRefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs @@ -800,7 +800,7 @@ namespace ICSharpCode.NRefactory.VB.Visitors throw new NotImplementedException(); - return EndNode(queryGroupClause, op); + //return EndNode(queryGroupClause, op); } public AstNode VisitAttribute(CSharp.Attribute attribute, object data) diff --git a/NRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs b/NRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs index 1e67de687..d18db55ed 100644 --- a/NRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs +++ b/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, /// the callback may be invoked concurrently on multiple threads. /// + [CLSCompliant(false)] public Action OnEntityLoaded { get; set; } ///