Skip to content

UseMutationWhenValueIsMutable code fix crashes at the EOF #15931

Closed

Description

@psfinaki

Bangggg:

bugger.mp4

Code:

let band = {| Name = "R.E.M." |}

band

Stacktrace:

System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values.
Parameter name: index
   at Microsoft.VisualStudio.Text.Implementation.UnaryStringRebuilder.GetChar(Char[] content,Int32 index)
   at <StartupCode$FSharp-Editor>.$UseMutationWhenValueIsMutable.loop@37-8(SourceText sourceText,Char ch,Int32 pos)
   at async StartupCode$FSharp-Editor(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.VisualStudio.FSharp.Editor.CodeFixExtensions.CodeFixContext-RegisterFsharpFix@108(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.CodeFixes.CodeFixService.GetCodeFixesAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)

Regression, caused by the recent changes.

Activity

  1. added
    Area-LangService-CodeFixes
    on Sep 5, 2023
  2. added this to the Backlog milestone on Sep 5, 2023
  3. self-assigned this
    on Sep 7, 2023
  4. psfinaki commented on Sep 13, 2023

    @psfinaki
    ContributorAuthor

    Okay so it's not because of anon records, it's because of the end of file there.

  5. changed the title [-]UseMutationWhenValueIsMutable code fix crashes for anon records[/-] [+]UseMutationWhenValueIsMutable code fix crashes at the EOF[/+] on Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area-LangService-CodeFixesBugNeeds-Triage

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions