-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Labels
bughelp wantedtype:codefixWork that adds or updates a codefix in the productWork that adds or updates a codefix in the product
Description
given the following sample code:
let inc i =
2where the i parameter is unused, the i parameter has a diagnostic saying it's unused, but asking for code actions at the i location results in the following stacktrace:
Message: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at FsAutoComplete.CodeFix.Navigation.loop@107(ISourceText lines, FSharpFunc`2 posChange, FSharpFunc`2 terminalCondition, FSharpFunc`2 checkCondition, Position firstPos, Position finalPos, Position pos) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/CodeFixes.fs:line 108
at FsAutoComplete.CodeFix.Navigation.walkPos(ISourceText lines, Position pos, FSharpFunc`2 posChange, FSharpFunc`2 terminalCondition, FSharpFunc`2 checkCondition) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/CodeFixes.fs:line 115
at FsAutoComplete.CodeFix.Navigation.walkBackUntilCondition@146-2.Invoke(FSharpFunc`2 checkCondition) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/CodeFixes.fs:line 146
at FsAutoComplete.CodeFix.RemoveUnusedBinding.binder@1-152(Diagnostic diagnostic, CodeActionParams codeActionParams, ISourceText lines, Range _arg2) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/CodeFixes/RemoveUnusedBinding.fs:line 53
at FsAutoComplete.CodeFix.RemoveUnusedBinding.binder@51-154.Invoke(FSharpResult`2 _arg1)
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 404
at FsAutoComplete.CodeFix.RemoveUnusedBinding.binder@51-151.Invoke(AsyncActivation`1 ctxt) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/CodeFixes/RemoveUnusedBinding.fs:line 51
at FsToolkit.ErrorHandling.AsyncResultCE.Return@12.Invoke(AsyncActivation`1 ctxt)
at FsAutoComplete.Lsp.binder@568-199.Invoke(AsyncActivation`1 ctxt) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/FsAutoComplete.Lsp.fs:line 568
at <StartupCode$FsAutoComplete-Core>.$Commands.TryGetLatestTypeCheckResultsForFile@561-16.Invoke(AsyncActivation`1 ctxt) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete.Core/Commands.fs:line 561
at FsAutoComplete.Lsp.tryGetParseResultsForFile@567-2.Invoke(AsyncActivation`1 ctxt) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/FsAutoComplete.Lsp.fs:line 567
at FsToolkit.ErrorHandling.AsyncResult.retn@44.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 104
This is in version 0.46.6.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bughelp wantedtype:codefixWork that adds or updates a codefix in the productWork that adds or updates a codefix in the product