Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Apr 14, 2023
1 parent f3caaca commit f8313de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Workspaces.Common/CSharp/DocumentRefactorings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ private static TupleExpressionSyntax CreateTupleExpression(ITypeSymbol typeSymbo
{
if (f.Expression is DeclarationExpressionSyntax declarationExpression)
return f.WithExpression(declarationExpression.WithType(declarationExpression.Type.WithSimplifierAnnotation()));
if (f.Expression is PredefinedTypeSyntax or MemberAccessExpressionSyntax)
{
return f.WithExpression(DeclarationExpression(ParseTypeName(f.Expression.ToString()).WithSimplifierAnnotation(), DiscardDesignation()));
}
SyntaxDebug.Fail(f.Expression);
return f;
Expand All @@ -110,6 +111,7 @@ private static TupleExpressionSyntax CreateTupleExpression(ITypeSymbol typeSymbo

return tupleExpression.WithArguments(newArguments);
}

public static Task<Document> ChangeTypeToVarAsync(
Document document,
TypeSyntax type,
Expand Down

0 comments on commit f8313de

Please sign in to comment.