From 3535e01482f2c6c15ad773b1d5df64f68ad67d41 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 23 Aug 2020 13:41:43 +0200 Subject: [PATCH] Fix regex for dotted property names. --- .../CSharp/Transforms/PatternStatementTransform.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs b/ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs index 76c6927a1..192d141cc 100644 --- a/ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs +++ b/ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs @@ -650,8 +650,6 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms return base.VisitIdentifier(identifier); } - - internal static bool IsBackingFieldOfAutomaticProperty(IField field, out IProperty property) { property = null; @@ -673,7 +671,7 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms /// /// static readonly System.Text.RegularExpressions.Regex automaticPropertyBackingFieldNameRegex - = new System.Text.RegularExpressions.Regex(@"^(<(?\w+)>k__BackingField|_(?\w+))$"); + = new System.Text.RegularExpressions.Regex(@"^(<(?.+)>k__BackingField|_(?.+))$"); static bool NameCouldBeBackingFieldOfAutomaticProperty(string name, out string propertyName) {