You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The closing brace is placed at the correct location, forming an empty statement block: M1(x => M2("a", y => M3<int>(z => { })));
The refactoring does not crash due to the malformed syntax.
Actual Behavior:
The closing brace is placed between the second and third closing parenthesis, leading to malformed syntax: M1(x => M2("a", y => M3<int>(z => {))});
After pressing Return the ChangeSignatureCodeRefactoringProvider throws an exception, leading to a gold bar. The stack trace is posted below.
The second problem does not seem to occur when the namespace declaration is missing.
System.NullReferenceException : Object reference not set to an instance of an object.
at Microsoft.CodeAnalysis.ChangeSignature.AbstractChangeSignatureService.GetParameterIndexFromInvocationArgument(SyntaxNode argument,Document document,SemanticModel semanticModel,CancellationToken cancellationToken)
at async Microsoft.CodeAnalysis.CSharp.ChangeSignature.CSharpChangeSignatureService.GetInvocationSymbolAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.ChangeSignature.AbstractChangeSignatureService.GetChangeSignatureContextAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.ChangeSignature.AbstractChangeSignatureService.GetChangeSignatureCodeActionAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.ChangeSignature.ChangeSignatureCodeRefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
The text was updated successfully, but these errors were encountered:
Version Used: VS 2022 17.4.0
Steps to Reproduce:
{
.Note that the parentheses are balanced at the start.
Expected Behavior:
M1(x => M2("a", y => M3<int>(z => { })));
Actual Behavior:
M1(x => M2("a", y => M3<int>(z => {))});
ChangeSignatureCodeRefactoringProvider
throws an exception, leading to a gold bar. The stack trace is posted below.The second problem does not seem to occur when the namespace declaration is missing.
The text was updated successfully, but these errors were encountered: