Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument out of Range: VB invert if #40589

Open
petrroll opened this issue Dec 25, 2019 · 1 comment
Open

Argument out of Range: VB invert if #40589

petrroll opened this issue Dec 25, 2019 · 1 comment
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Projects
Milestone

Comments

@petrroll
Copy link
Contributor

Version Used:
16.4.

Steps to Reproduce:

  1. Caret in the middle of if token -> Invert if
  2. Not sure how specific the code was

Expected Behavior:

Actual Behavior:

System.ArgumentOutOfRangeException : Zadaný argument je mimo rozsah platných hodnot.
   at Microsoft.CodeAnalysis.SyntaxList`1.get_Item(Int32 index)
   at Microsoft.CodeAnalysis.VisualBasic.InvertIf.VisualBasicInvertSingleLineIfCodeRefactoringProvider.UpdateIf(SourceText sourceText,SingleLineIfStatementSyntax ifNode,SyntaxNode condition,SyntaxList`1 trueStatements,SyntaxList`1 falseStatements)
   at Microsoft.CodeAnalysis.InvertIf.AbstractInvertIfCodeRefactoringProvider`3.GetRootWithInvertIfStatement(SourceText text,SyntaxNode root,TIfStatementSyntax ifNode,InvertIfStyle invertIfStyle,SyntaxNode subsequentSingleExitPointOpt,SyntaxNode negatedExpression)
   at async Microsoft.CodeAnalysis.InvertIf.AbstractInvertIfCodeRefactoringProvider`3.InvertIfAsync[TIfStatementSyntax,TStatementSyntax,TEmbeddedStatement](<Neznámé parametry>)
   at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync(<Neznámé parametry>)
   at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync(<Neznámé parametry>)
   at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<Neznámé parametry>)
   at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<Neznámé parametry>)
   at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.<>c__DisplayClass11_0.<GetPreviewAsync>b__0(<Neznámé parametry>)
   at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Neznámé parametry>)
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
@jinujoseph jinujoseph added Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it labels Jan 8, 2020
@jinujoseph jinujoseph added this to the Backlog milestone Jan 8, 2020
@jinujoseph
Copy link
Contributor

cc @jasonmalinowski

@jinujoseph jinujoseph added this to InQueue in Small Fixes via automation Jan 8, 2020
@jinujoseph jinujoseph added the IDE-CodeStyle Built-in analyzers, fixes, and refactorings label Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Projects
Small Fixes
  
InQueue
Development

No branches or pull requests

3 participants