Skip to content

UseMutationWhenValueIsMutable code fix crashes at the EOF #15931

@psfinaki

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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions