-
Couldn't load subscription status.
- Fork 833
Closed
Labels
Area-LangService-CodeFixesCode fixes associated with diagnosticsCode fixes associated with diagnosticsBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.good first issue
Milestone
Description
This code throws:
type MyType = { Value: int }
let test = { Value = 42 }xThe stack trace:
System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values.
Parameter name: index
at Microsoft.VisualStudio.Text.Implementation.StringRebuilderForString.get_Item(Int32 index)
at async StartupCode$FSharp-Editor(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.VisualStudio.FSharp.Editor.CodeFixExtensions.CodeFixContext-RegisterFsharpFix@93(<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>)This happens because the code above happens to produce FS0003 (This value is not a function) whereas the code fix searches for the - sign in the code and fails to find one here.
Metadata
Metadata
Assignees
Labels
Area-LangService-CodeFixesCode fixes associated with diagnosticsCode fixes associated with diagnosticsBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.good first issue
Type
Projects
Status
Done