From 844f8f1a3e074c337a95e710c447f89078f22f8f Mon Sep 17 00:00:00 2001 From: GrahamTheCoder Date: Sat, 23 May 2020 15:46:15 +0100 Subject: [PATCH] Use C# 7.3 compatible null check and simplify unary negation --- CHANGELOG.md | 1 + CodeConverter/CSharp/CommonConversions.cs | 7 +- CodeConverter/CSharp/ExpressionNodeVisitor.cs | 2 +- .../CSharp/ExpressionTests/ExpressionTests.cs | 20 +++++- Tests/CSharp/StatementTests/StatementTests.cs | 4 +- Tests/CSharp/TypeCastTests.cs | 2 +- .../MyNamespace.Static.1.Designer.cs | 4 +- .../MyNamespace.Static.2.Designer.cs | 2 +- .../MyNamespace.Static.2.Designer.cs | 2 +- .../MyNamespace.Static.1.Designer.cs | 4 +- .../MyNamespace.Static.2.Designer.cs | 2 +- .../MyNamespace.Static.2.Designer.cs | 72 +++++++++---------- .../MyNamespace.Static.3.Designer.cs | 2 +- .../MyNamespace.Static.1.Designer.cs | 6 +- .../MyNamespace.Static.2.Designer.cs | 2 +- .../WindowsAppVb/WinformsDesignerTest.cs | 2 +- 16 files changed, 76 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9a1a0128..8d9b15fbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * Remove redundant empty string coalesce in string comparison - [#500](https://github.com/icsharpcode/CodeConverter/issues/500) * Convert VB comparison operators - [#396](https://github.com/icsharpcode/CodeConverter/issues/396) * Convert Redim Preserve of 1D array to Array.Resize - [#501](https://github.com/icsharpcode/CodeConverter/issues/501) +* Use C#7.3 compatible null check ### C# -> VB diff --git a/CodeConverter/CSharp/CommonConversions.cs b/CodeConverter/CSharp/CommonConversions.cs index 4554a20ab..ed4982e01 100644 --- a/CodeConverter/CSharp/CommonConversions.cs +++ b/CodeConverter/CSharp/CommonConversions.cs @@ -661,10 +661,9 @@ public static CSSyntax.BinaryExpressionSyntax NotNothingComparison(ExpressionSyn public static ExpressionSyntax NothingComparison(ExpressionSyntax otherArgument, bool isReferenceType) { - if (isReferenceType) { - return SyntaxFactory.IsPatternExpression(otherArgument, SyntaxFactory.ConstantPattern(SyntaxFactory.LiteralExpression(CSSyntaxKind.NullLiteralExpression))); - } - return SyntaxFactory.BinaryExpression(CSSyntaxKind.EqualsExpression, otherArgument, SyntaxFactory.LiteralExpression(CSSyntaxKind.DefaultLiteralExpression)); + // Old project style doesn't support is pattern expressions (or indeed anything beyond c#7.3), so can't use "x is null" + var literalKind = isReferenceType ? CSSyntaxKind.NullLiteralExpression : CSSyntaxKind.DefaultLiteralExpression; + return SyntaxFactory.BinaryExpression(CSSyntaxKind.EqualsExpression, otherArgument, SyntaxFactory.LiteralExpression(literalKind)); } } } \ No newline at end of file diff --git a/CodeConverter/CSharp/ExpressionNodeVisitor.cs b/CodeConverter/CSharp/ExpressionNodeVisitor.cs index be3942b80..208737b9e 100644 --- a/CodeConverter/CSharp/ExpressionNodeVisitor.cs +++ b/CodeConverter/CSharp/ExpressionNodeVisitor.cs @@ -675,7 +675,7 @@ private ExpressionSyntax AsBool(VBSyntax.UnaryExpressionSyntax node, ExpressionS private async Task NegateAndSimplifyOrNullAsync(VBSyntax.UnaryExpressionSyntax node, ExpressionSyntax expr) { - if (await _operatorConverter.ConvertNothingComparisonOrNullAsync(node.Operand, true) is ExpressionSyntax nothingComparison) { + if (await _operatorConverter.ConvertNothingComparisonOrNullAsync(node.Operand.SkipParens(), true) is ExpressionSyntax nothingComparison) { return nothingComparison; } else if (expr is BinaryExpressionSyntax bes && bes.OperatorToken.IsKind(SyntaxKind.EqualsToken)) { return bes.WithOperatorToken(SyntaxFactory.Token(SyntaxKind.ExclamationEqualsToken)); diff --git a/Tests/CSharp/ExpressionTests/ExpressionTests.cs b/Tests/CSharp/ExpressionTests/ExpressionTests.cs index 9e295f4ee..7244a8681 100644 --- a/Tests/CSharp/ExpressionTests/ExpressionTests.cs +++ b/Tests/CSharp/ExpressionTests/ExpressionTests.cs @@ -356,6 +356,24 @@ internal partial class TestClass }"); } + [Fact] + public async Task GenericComparisonAsync() + { + await TestConversionVisualBasicToCSharpAsync(@"Public Class GenericComparison + Public Sub m(Of T)(p As T) + If p Is Nothing Then Return + End Sub +End Class", @" +public partial class GenericComparison +{ + public void m(T p) + { + if (p == null) + return; + } +}"); + } + [Fact] public async Task AccessSharedThroughInstanceAsync() { @@ -1308,7 +1326,7 @@ public partial class Foo protected void OnBar(EventArgs e) { - if (Bar is null) + if (Bar == null) { Debug.WriteLine(""No subscriber""); } diff --git a/Tests/CSharp/StatementTests/StatementTests.cs b/Tests/CSharp/StatementTests/StatementTests.cs index f6462133e..c0180bac1 100644 --- a/Tests/CSharp/StatementTests/StatementTests.cs +++ b/Tests/CSharp/StatementTests/StatementTests.cs @@ -1390,7 +1390,7 @@ internal partial class TestClass { private void TestMethod(object nullObject) { - if (nullObject is null) + if (nullObject == null) throw new ArgumentNullException(nameof(nullObject)); lock (nullObject) Console.WriteLine(nullObject); @@ -1411,7 +1411,7 @@ internal partial class TestClass { private void TestMethod(object nullObject) { - if (nullObject is null) + if (nullObject == null) throw new ArgumentNullException(nameof(nullObject)); } }"); diff --git a/Tests/CSharp/TypeCastTests.cs b/Tests/CSharp/TypeCastTests.cs index cee17e9bf..84c62ca82 100644 --- a/Tests/CSharp/TypeCastTests.cs +++ b/Tests/CSharp/TypeCastTests.cs @@ -382,7 +382,7 @@ public partial class MultipleCasts { public static T ToGenericParameter(object Value) { - if (Value is null) + if (Value == null) { return default; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/VbLibrary/My Project/MyNamespace.Static.1.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/VbLibrary/My Project/MyNamespace.Static.1.Designer.cs index 07e3b0a9a..f1da5811f 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/VbLibrary/My Project/MyNamespace.Static.1.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/VbLibrary/My Project/MyNamespace.Static.1.Designer.cs @@ -129,7 +129,7 @@ public override string ToString() [DebuggerHidden()] private static T Create__Instance__(T instance) where T : new() { - if (instance is null) + if (instance == null) { return new T(); } @@ -165,7 +165,7 @@ internal T GetInstance [DebuggerHidden()] get { - if (m_ThreadStaticValue is null) + if (m_ThreadStaticValue == null) m_ThreadStaticValue = new T(); return m_ThreadStaticValue; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/VbLibrary/My Project/MyNamespace.Static.2.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/VbLibrary/My Project/MyNamespace.Static.2.Designer.cs index ee6fb7cb0..79d5e92db 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/VbLibrary/My Project/MyNamespace.Static.2.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/VbLibrary/My Project/MyNamespace.Static.2.Designer.cs @@ -68,7 +68,7 @@ public static void set_AttributeValue(XElement source, XName name, string value) [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static XAttribute CreateAttribute(XName name, object value) { - if (value is null) + if (value == null) { return null; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/ConsoleApp4/My Project/MyNamespace.Static.2.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/ConsoleApp4/My Project/MyNamespace.Static.2.Designer.cs index 4175324b8..53de7d1b3 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/ConsoleApp4/My Project/MyNamespace.Static.2.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/ConsoleApp4/My Project/MyNamespace.Static.2.Designer.cs @@ -67,7 +67,7 @@ public static void set_AttributeValue(XElement source, XName name, string value) [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static XAttribute CreateAttribute(XName name, object value) { - if (value is null) + if (value == null) { return null; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbLibrary/My Project/MyNamespace.Static.1.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbLibrary/My Project/MyNamespace.Static.1.Designer.cs index 07e3b0a9a..f1da5811f 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbLibrary/My Project/MyNamespace.Static.1.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbLibrary/My Project/MyNamespace.Static.1.Designer.cs @@ -129,7 +129,7 @@ public override string ToString() [DebuggerHidden()] private static T Create__Instance__(T instance) where T : new() { - if (instance is null) + if (instance == null) { return new T(); } @@ -165,7 +165,7 @@ internal T GetInstance [DebuggerHidden()] get { - if (m_ThreadStaticValue is null) + if (m_ThreadStaticValue == null) m_ThreadStaticValue = new T(); return m_ThreadStaticValue; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbLibrary/My Project/MyNamespace.Static.2.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbLibrary/My Project/MyNamespace.Static.2.Designer.cs index ee6fb7cb0..79d5e92db 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbLibrary/My Project/MyNamespace.Static.2.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbLibrary/My Project/MyNamespace.Static.2.Designer.cs @@ -68,7 +68,7 @@ public static void set_AttributeValue(XElement source, XName name, string value) [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static XAttribute CreateAttribute(XName name, object value) { - if (value is null) + if (value == null) { return null; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbNetStandardLib/My Project/MyNamespace.Static.2.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbNetStandardLib/My Project/MyNamespace.Static.2.Designer.cs index b48db08df..18fe10b45 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbNetStandardLib/My Project/MyNamespace.Static.2.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbNetStandardLib/My Project/MyNamespace.Static.2.Designer.cs @@ -25,7 +25,7 @@ public static int CompareString(string Left, string Right, bool TextCompare) return 0; } - if (Left is null) + if (Left == null) { if (Right.Length == 0) { @@ -35,7 +35,7 @@ public static int CompareString(string Left, string Right, bool TextCompare) return -1; } - if (Right is null) + if (Right == null) { if (Left.Length == 0) { @@ -124,7 +124,7 @@ private static object GetEnumValue(object Value) public static bool ToBoolean(string Value) { - if (Value is null) + if (Value == null) { Value = ""; } @@ -157,7 +157,7 @@ public static bool ToBoolean(string Value) public static bool ToBoolean(object Value) { - if (Value is null) + if (Value == null) { return false; } @@ -225,7 +225,7 @@ public static bool ToBoolean(object Value) public static byte ToByte(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -248,7 +248,7 @@ public static byte ToByte(string Value) public static byte ToByte(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -317,7 +317,7 @@ public static byte ToByte(object Value) [CLSCompliant(false)] public static sbyte ToSByte(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -341,7 +341,7 @@ public static sbyte ToSByte(string Value) [CLSCompliant(false)] public static sbyte ToSByte(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -409,7 +409,7 @@ public static sbyte ToSByte(object Value) public static short ToShort(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -432,7 +432,7 @@ public static short ToShort(string Value) public static short ToShort(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -501,7 +501,7 @@ public static short ToShort(object Value) [CLSCompliant(false)] public static ushort ToUShort(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -525,7 +525,7 @@ public static ushort ToUShort(string Value) [CLSCompliant(false)] public static ushort ToUShort(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -593,7 +593,7 @@ public static ushort ToUShort(object Value) public static int ToInteger(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -616,7 +616,7 @@ public static int ToInteger(string Value) public static int ToInteger(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -685,7 +685,7 @@ public static int ToInteger(object Value) [CLSCompliant(false)] public static uint ToUInteger(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -709,7 +709,7 @@ public static uint ToUInteger(string Value) [CLSCompliant(false)] public static uint ToUInteger(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -777,7 +777,7 @@ public static uint ToUInteger(object Value) public static long ToLong(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -800,7 +800,7 @@ public static long ToLong(string Value) public static long ToLong(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -869,7 +869,7 @@ public static long ToLong(object Value) [CLSCompliant(false)] public static ulong ToULong(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -893,7 +893,7 @@ public static ulong ToULong(string Value) [CLSCompliant(false)] public static ulong ToULong(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -973,7 +973,7 @@ public static decimal ToDecimal(bool Value) public static decimal ToDecimal(string Value) { - if (Value is null) + if (Value == null) { return 0M; } @@ -1000,7 +1000,7 @@ public static decimal ToDecimal(string Value) public static decimal ToDecimal(object Value) { - if (Value is null) + if (Value == null) { return 0M; } @@ -1070,7 +1070,7 @@ private static decimal ParseDecimal(string Value, System.Globalization.NumberFor { System.Globalization.NumberFormatInfo NormalizedNumberFormat; var culture = GetCultureInfo(); - if (NumberFormat is null) + if (NumberFormat == null) { NumberFormat = culture.NumberFormat; } @@ -1131,7 +1131,7 @@ private static System.Globalization.NumberFormatInfo GetNormalizedNumberFormat(S public static float ToSingle(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -1160,7 +1160,7 @@ public static float ToSingle(string Value) public static float ToSingle(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -1228,7 +1228,7 @@ public static float ToSingle(object Value) public static double ToDouble(string Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -1251,7 +1251,7 @@ public static double ToDouble(string Value) public static double ToDouble(object Value) { - if (Value is null) + if (Value == null) { return 0; } @@ -1357,7 +1357,7 @@ public static DateTime ToDate(string Value) public static DateTime ToDate(object Value) { - if (Value is null) + if (Value == null) { return default; } @@ -1376,7 +1376,7 @@ public static DateTime ToDate(object Value) public static char ToChar(string Value) { - if (Value is null || Value.Length == 0) + if (Value == null || Value.Length == 0) { return Convert.ToChar(0 & 0xFFFF); } @@ -1386,7 +1386,7 @@ public static char ToChar(string Value) public static char ToChar(object Value) { - if (Value is null) + if (Value == null) { return Convert.ToChar(0 & 0xFFFF); } @@ -1405,7 +1405,7 @@ public static char ToChar(object Value) public static char[] ToCharArrayRankOne(string Value) { - if (Value is null) + if (Value == null) { Value = ""; } @@ -1415,7 +1415,7 @@ public static char[] ToCharArrayRankOne(string Value) public static char[] ToCharArrayRankOne(object Value) { - if (Value is null) + if (Value == null) { return "".ToCharArray(); } @@ -1494,7 +1494,7 @@ public static char[] ToCharArrayRankOne(object Value) public static new string ToString(object Value) { - if (Value is null) + if (Value == null) { return null; } @@ -1702,7 +1702,7 @@ internal static bool IsHexOrOctValue(string Value, ref ulong ui64Value) public static T ToGenericParameter(object Value) { - if (Value is null) + if (Value == null) { return default; } @@ -1810,7 +1810,7 @@ private Utils() public static Array CopyArray(Array arySrc, Array aryDest) { - if (arySrc is null) + if (arySrc == null) { return aryDest; } @@ -1992,7 +1992,7 @@ public static char ChrW(int CharCode) public static int AscW(string String) { - if (String is null || String.Length == 0) + if (String == null || String.Length == 0) { throw new ArgumentException(); } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbNetStandardLib/My Project/MyNamespace.Static.3.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbNetStandardLib/My Project/MyNamespace.Static.3.Designer.cs index 769a869ab..c5dd52e10 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbNetStandardLib/My Project/MyNamespace.Static.3.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VbNetStandardLib/My Project/MyNamespace.Static.3.Designer.cs @@ -67,7 +67,7 @@ public static void set_AttributeValue(XElement source, XName name, string value) [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static XAttribute CreateAttribute(XName name, object value) { - if (value is null) + if (value == null) { return null; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/My Project/MyNamespace.Static.1.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/My Project/MyNamespace.Static.1.Designer.cs index 71789324e..509c3d63b 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/My Project/MyNamespace.Static.1.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/My Project/MyNamespace.Static.1.Designer.cs @@ -120,7 +120,7 @@ internal sealed partial class MyForms [DebuggerHidden()] private static T Create__Instance__(T Instance) where T : Form, new() { - if (Instance is null || Instance.IsDisposed) + if (Instance == null || Instance.IsDisposed) { if (m_FormBeingCreated is object) { @@ -245,7 +245,7 @@ public override string ToString() [DebuggerHidden()] private static T Create__Instance__(T instance) where T : new() { - if (instance is null) + if (instance == null) { return new T(); } @@ -281,7 +281,7 @@ internal T GetInstance [DebuggerHidden()] get { - if (m_ThreadStaticValue is null) + if (m_ThreadStaticValue == null) m_ThreadStaticValue = new T(); return m_ThreadStaticValue; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/My Project/MyNamespace.Static.2.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/My Project/MyNamespace.Static.2.Designer.cs index 7daa4dc76..a80faa262 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/My Project/MyNamespace.Static.2.Designer.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/My Project/MyNamespace.Static.2.Designer.cs @@ -68,7 +68,7 @@ public static void set_AttributeValue(XElement source, XName name, string value) [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static XAttribute CreateAttribute(XName name, object value) { - if (value is null) + if (value == null) { return null; } diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/WinformsDesignerTest.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/WinformsDesignerTest.cs index 97b505e8c..3516e4d02 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/WinformsDesignerTest.cs +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/WindowsAppVb/WinformsDesignerTest.cs @@ -20,7 +20,7 @@ private void Button1_Click(object sender, EventArgs e) private void CheckedChangedOrButtonClicked(object sender, EventArgs e) { string formConstructedText = "Form constructed"; - if (!(My.MyProject.Forms.m_WinformsDesignerTest is null) && (My.MyProject.Forms.WinformsDesignerTest.Text ?? "") != (formConstructedText ?? "")) + if (My.MyProject.Forms.m_WinformsDesignerTest is object && (My.MyProject.Forms.WinformsDesignerTest.Text ?? "") != (formConstructedText ?? "")) { My.MyProject.Forms.WinformsDesignerTest.Text = formConstructedText; }