From e9a73a2c8c26feabc0b503a9f4b8445d93d6c782 Mon Sep 17 00:00:00 2001 From: CyrusNajmabadi Date: Sat, 12 Nov 2016 20:42:44 -0800 Subject: [PATCH] Remove usage of TypeSwitch. --- .../AutomaticCompletion/AutomaticLineEnderCommandHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EditorFeatures/CSharp/AutomaticCompletion/AutomaticLineEnderCommandHandler.cs b/src/EditorFeatures/CSharp/AutomaticCompletion/AutomaticLineEnderCommandHandler.cs index 27a3ed3b651..02a59c98e02 100644 --- a/src/EditorFeatures/CSharp/AutomaticCompletion/AutomaticLineEnderCommandHandler.cs +++ b/src/EditorFeatures/CSharp/AutomaticCompletion/AutomaticLineEnderCommandHandler.cs @@ -191,7 +191,8 @@ private static bool CheckLocation(SourceText text, int position, SyntaxNode owni } // check whether using has contents - if (owningNode.TypeSwitch((UsingDirectiveSyntax u) => u.Name == null || u.Name.IsMissing)) + if (owningNode is UsingDirectiveSyntax u && + (u.Name == null || u.Name.IsMissing)) { return false; } -- GitLab